From 3eea219548e84efdbc3148ce378fcba865f97a01 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 6 Dec 2013 14:15:43 -0800 Subject: Add basic source formatting tools --- src/common/utils.hpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/common/utils.hpp') diff --git a/src/common/utils.hpp b/src/common/utils.hpp index 2d2e2d5..f975e34 100644 --- a/src/common/utils.hpp +++ b/src/common/utils.hpp @@ -1,21 +1,21 @@ #ifndef UTILS_HPP #define UTILS_HPP -#include "../sanity.hpp" +# include "../sanity.hpp" -#include -#include +# include +# include -#include +# include -#include "../strings/fwd.hpp" -#include "../strings/vstring.hpp" +# include "../strings/fwd.hpp" +# include "../strings/vstring.hpp" -#include "../io/fwd.hpp" +# include "../io/fwd.hpp" -#include "const_array.hpp" -#include "operators.hpp" -#include "utils2.hpp" +# include "const_array.hpp" +# include "operators.hpp" +# include "utils2.hpp" template struct is_trivially_copyable @@ -122,16 +122,16 @@ void stamp_time(timestamp_milliseconds_buffer&); void log_with_timestamp(io::WriteFile& out, XString line); // TODO VString? -#define TIMESTAMP_DUMMY "YYYY-MM-DD HH:MM:SS" +# define TIMESTAMP_DUMMY "YYYY-MM-DD HH:MM:SS" static_assert(sizeof(TIMESTAMP_DUMMY) == sizeof(timestamp_seconds_buffer), "timestamp size"); -#define WITH_TIMESTAMP(str) str TIMESTAMP_DUMMY +# define WITH_TIMESTAMP(str) str TIMESTAMP_DUMMY // str: prefix: YYYY-MM-DD HH:MM:SS // sizeof: 01234567890123456789012345678 // str + sizeof: ^ // -1: ^ // there's probably a better way to do this now -#define REPLACE_TIMESTAMP(str, t) \ +# define REPLACE_TIMESTAMP(str, t) \ stamp_time( \ reinterpret_cast( \ str + sizeof(str) \ -- cgit v1.2.3-70-g09d2