From 1517b529d344d61a7367df98d6298ed6eb775822 Mon Sep 17 00:00:00 2001 From: Terik23 Date: Wed, 28 Mar 2018 16:55:47 +0500 Subject: [PATCH] fix some warning in example and test --- example/example.cpp | 10 +++++----- test/test.cpp | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index cde130b..c5583de 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -48,11 +48,11 @@ int someVar = 0; enum class Color { RED, GREEN, BLUE }; void TestCase1() { - SomeStruct someVar{1}; - Long otherVar{2}; - int intValue{3}; - SomeStruct* ptrVar = &someVar; - SomeStruct** ptrptrVar = &ptrVar; + SomeStruct someVar; + Long otherVar; + int intValue; + SomeStruct* ptrVar; + SomeStruct** ptrptrVar; constexpr auto constexpr_work_fine = NAMEOF(intValue); std::cout << constexpr_work_fine << std::endl; // intValue diff --git a/test/test.cpp b/test/test.cpp index a7a1246..3a7a176 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -52,11 +52,11 @@ int someVar = 0; enum class Color { RED, GREEN, BLUE }; TEST_CASE("NAMEOF") { - SomeStruct someVar{1}; - Long otherVar{2}; - int intValue{3}; - SomeStruct* ptrVar = &someVar; - SomeStruct** ptrptrVar = &ptrVar; + SomeStruct someVar; + Long otherVar; + int intValue; + SomeStruct* ptrVar; + SomeStruct** ptrptrVar; SECTION("constexpr") { constexpr auto constexpr_work_fine = NAMEOF(intValue); @@ -107,11 +107,11 @@ TEST_CASE("NAMEOF_TYPE") { } TEST_CASE("NAMEOF_FULL") { - SomeStruct someVar{1}; - Long otherVar{2}; - int intValue{3}; - SomeStruct* ptrVar = &someVar; - SomeStruct** ptrptrVar = &ptrVar; + SomeStruct someVar; + Long otherVar; + int intValue; + SomeStruct* ptrVar; + SomeStruct** ptrptrVar; SECTION("NAMEOF_FULL") { REQUIRE(std::strcmp(NAMEOF_FULL(someVar), "someVar") == 0);