[libcxx-commits] [libcxx] e03ce65 - [libc++][NFC] Reformatting in random_device.h and random.cpp
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 21 10:33:08 PST 2021
Author: Louis Dionne
Date: 2021-12-21T13:32:56-05:00
New Revision: e03ce6519003fc8d997de0a47f3d654f223c6b97
URL: https://github.com/llvm/llvm-project/commit/e03ce6519003fc8d997de0a47f3d654f223c6b97
DIFF: https://github.com/llvm/llvm-project/commit/e03ce6519003fc8d997de0a47f3d654f223c6b97.diff
LOG: [libc++][NFC] Reformatting in random_device.h and random.cpp
Added:
Modified:
libcxx/include/__random/random_device.h
libcxx/src/random.cpp
Removed:
################################################################################
diff --git a/libcxx/include/__random/random_device.h b/libcxx/include/__random/random_device.h
index 6a6b0cc306674..835f726fdbccc 100644
--- a/libcxx/include/__random/random_device.h
+++ b/libcxx/include/__random/random_device.h
@@ -27,7 +27,7 @@ class _LIBCPP_TYPE_VIS random_device
{
#ifdef _LIBCPP_USING_DEV_RANDOM
int __f_;
-#endif // defined(_LIBCPP_USING_DEV_RANDOM)
+#endif
public:
// types
typedef unsigned result_type;
diff --git a/libcxx/src/random.cpp b/libcxx/src/random.cpp
index 86740dd490324..286a457851549 100644
--- a/libcxx/src/random.cpp
+++ b/libcxx/src/random.cpp
@@ -9,8 +9,8 @@
#include <__config>
#if defined(_LIBCPP_USING_WIN32_RANDOM)
-// Must be defined before including stdlib.h to enable rand_s().
-#define _CRT_RAND_S
+ // Must be defined before including stdlib.h to enable rand_s().
+# define _CRT_RAND_S
#endif // defined(_LIBCPP_USING_WIN32_RANDOM)
#include "limits"
@@ -18,7 +18,7 @@
#include "system_error"
#if defined(__sun__)
-#define rename solaris_headers_are_broken
+# define rename solaris_headers_are_broken
#endif // defined(__sun__)
#include <errno.h>
@@ -26,16 +26,16 @@
#include <stdlib.h>
#if defined(_LIBCPP_USING_GETENTROPY)
-#include <sys/random.h>
+# include <sys/random.h>
#elif defined(_LIBCPP_USING_DEV_RANDOM)
-#include <fcntl.h>
-#include <unistd.h>
-#if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>)
-#include <sys/ioctl.h>
-#include <linux/random.h>
-#endif
+# include <fcntl.h>
+# include <unistd.h>
+# if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>)
+# include <sys/ioctl.h>
+# include <linux/random.h>
+# endif
#elif defined(_LIBCPP_USING_NACL_RANDOM)
-#include <nacl/nacl_random.h>
+# include <nacl/nacl_random.h>
#endif
More information about the libcxx-commits
mailing list