Skip to content

Commit

Permalink
Use global namespaces in defines.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: f4bb51050ae51d4ff2baddd23dbd0e237f4b8283
  • Loading branch information
levlam committed Jul 19, 2020
1 parent c328bca commit 01d768f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tdutils/td/utils/as.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ConstAs {
#if __GLIBCXX__
#define TD_IS_TRIVIALLY_COPYABLE(T) __has_trivial_copy(T)
#else
#define TD_IS_TRIVIALLY_COPYABLE(T) std::is_trivially_copyable<T>::value
#define TD_IS_TRIVIALLY_COPYABLE(T) ::std::is_trivially_copyable<T>::value
#endif

template <class ToT, class FromT,
Expand Down
2 changes: 1 addition & 1 deletion tdutils/td/utils/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define STRIP_LOG VERBOSITY_NAME(DEBUG)
#endif
#define LOG_IS_STRIPPED(strip_level) \
(std::integral_constant<int, VERBOSITY_NAME(strip_level)>() > std::integral_constant<int, STRIP_LOG>())
(::std::integral_constant<int, VERBOSITY_NAME(strip_level)>() > ::std::integral_constant<int, STRIP_LOG>())

#define LOGGER(interface, options, level, comment) ::td::Logger(interface, options, level, __FILE__, __LINE__, comment)

Expand Down
26 changes: 13 additions & 13 deletions tdutils/td/utils/tl_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@
#include <unordered_set>
#include <utility>

#define BEGIN_STORE_FLAGS() \
do { \
td::uint32 flags_store = 0; \
td::uint32 bit_offset_store = 0
#define BEGIN_STORE_FLAGS() \
do { \
::td::uint32 flags_store = 0; \
::td::uint32 bit_offset_store = 0

#define STORE_FLAG(flag) \
flags_store |= (flag) << bit_offset_store; \
bit_offset_store++

#define END_STORE_FLAGS() \
CHECK(bit_offset_store < 31); \
td::store(flags_store, storer); \
} \
#define END_STORE_FLAGS() \
CHECK(bit_offset_store < 31); \
::td::store(flags_store, storer); \
} \
while (false)

#define BEGIN_PARSE_FLAGS() \
do { \
td::uint32 flags_parse; \
td::uint32 bit_offset_parse = 0; \
td::parse(flags_parse, parser)
#define BEGIN_PARSE_FLAGS() \
do { \
::td::uint32 flags_parse; \
::td::uint32 bit_offset_parse = 0; \
::td::parse(flags_parse, parser)

#define PARSE_FLAG(flag) \
flag = ((flags_parse >> bit_offset_parse) & 1) != 0; \
Expand Down

0 comments on commit 01d768f

Please sign in to comment.