diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-06 13:37:11 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-06 13:37:11 +0300 |
commit | 18b6c49a90e3b8f5eb04febaf0bc9bfb9db0e8a9 (patch) | |
tree | b838ec64c0b0ab3bd5834909677d60fca3792f04 /source | |
parent | 572c48cf98601c66eebec27bb40cfc7e05ea341c (diff) |
Cleanup: rename namespace TimeIt to timeit
According to our style guide, namespaces should have
lower case names.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_timeit.hh | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/timeit.cc | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_timeit.hh b/source/blender/blenlib/BLI_timeit.hh index 34c2d63cbd7..f0968587597 100644 --- a/source/blender/blenlib/BLI_timeit.hh +++ b/source/blender/blenlib/BLI_timeit.hh @@ -23,8 +23,7 @@ #include "BLI_sys_types.h" -namespace blender { -namespace Timeit { +namespace blender::timeit { using Clock = std::chrono::steady_clock; using TimePoint = Clock::time_point; @@ -54,9 +53,8 @@ class ScopedTimer { } }; -} // namespace Timeit -} // namespace blender +} // namespace blender::timeit -#define SCOPED_TIMER(name) blender::Timeit::ScopedTimer scoped_timer(name) +#define SCOPED_TIMER(name) blender::timeit::ScopedTimer scoped_timer(name) #endif /* __BLI_TIMEIT_HH__ */ diff --git a/source/blender/blenlib/intern/timeit.cc b/source/blender/blenlib/intern/timeit.cc index 7938784da67..9e07e44ca12 100644 --- a/source/blender/blenlib/intern/timeit.cc +++ b/source/blender/blenlib/intern/timeit.cc @@ -16,8 +16,7 @@ #include "BLI_timeit.hh" -namespace blender { -namespace Timeit { +namespace blender::timeit { void print_duration(Nanoseconds duration) { @@ -32,5 +31,4 @@ void print_duration(Nanoseconds duration) } } -} // namespace Timeit -} // namespace blender +} // namespace blender::timeit |