浏览代码

Fix error in doctest.h under MSVC 2022 (#157)

Warns about not having additional inner braces for unions, however, it is easier to just {} and avoid it.
Joshie 3 年之前
父节点
当前提交
b80241fa92
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      UnitTests/doctest.h

+ 1 - 1
UnitTests/doctest.h

@@ -3206,7 +3206,7 @@ typedef timer_large_integer::type ticks_t;
     ticks_t getCurrentTicks() { return DOCTEST_CONFIG_GETCURRENTTICKS(); }
     ticks_t getCurrentTicks() { return DOCTEST_CONFIG_GETCURRENTTICKS(); }
 #elif defined(DOCTEST_PLATFORM_WINDOWS)
 #elif defined(DOCTEST_PLATFORM_WINDOWS)
     ticks_t getCurrentTicks() {
     ticks_t getCurrentTicks() {
-        static LARGE_INTEGER hz = {0}, hzo = {0};
+        static LARGE_INTEGER hz{}, hzo{};
         if(!hz.QuadPart) {
         if(!hz.QuadPart) {
             QueryPerformanceFrequency(&hz);
             QueryPerformanceFrequency(&hz);
             QueryPerformanceCounter(&hzo);
             QueryPerformanceCounter(&hzo);