From 1926181cb7c8570fe57ec1b39d4241b9dd156333 Mon Sep 17 00:00:00 2001 From: Alexander Lyons Harkness Date: Sat, 23 Dec 2017 12:49:08 +0000 Subject: Fix style of Tools --- Tools/ProtoProxy/Globals.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Tools/ProtoProxy/Globals.h') diff --git a/Tools/ProtoProxy/Globals.h b/Tools/ProtoProxy/Globals.h index 3ab01a61f..0ce5ea878 100644 --- a/Tools/ProtoProxy/Globals.h +++ b/Tools/ProtoProxy/Globals.h @@ -195,14 +195,14 @@ typedef unsigned char Byte; // Common definitions: -/// Evaluates to the number of elements in an array (compile-time!) +/** Evaluates to the number of elements in an array (compile-time!) */ #define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) -/// Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)" ) +/* Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)") */ #define KiB * 1024 -/// Faster than (int)floorf((float)x / (float)div) -#define FAST_FLOOR_DIV( x, div ) ( (x) < 0 ? (((int)x / div) - 1) : ((int)x / div) ) +/* Faster than (int)floorf((float)x / (float)div) */ +#define FAST_FLOOR_DIV(x, div) ((x) < 0 ? (((int)x / div) - 1) : ((int)x / div)) // Own version of assert() that writes failed assertions to the log for review #ifdef NDEBUG @@ -212,7 +212,7 @@ typedef unsigned char Byte; #endif // Pretty much the same as ASSERT() but stays in Release builds -#define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) ) +#define VERIFY(x) (!!(x) || (LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), exit(1), 0)) // C++11 has std::shared_ptr in , included earlier #define SharedPtr std::shared_ptr @@ -222,10 +222,10 @@ typedef unsigned char Byte; -/// A generic interface used mainly in ForEach() functions +/* A generic interface used mainly in ForEach() functions */ template class cItemCallback { public: - /// Called for each item in the internal list; return true to stop the loop, or false to continue enumerating + /* Called for each item in the internal list; return true to stop the loop, or false to continue enumerating */ virtual bool Item(Type * a_Type) = 0; } ; -- cgit v1.2.3