[Bf-blender-cvs] [2c916c97ac7] master: Cleanup: clang-tidy quiet equals-default, nullptr warnings

Campbell Barton noreply at git.blender.org
Wed Jun 23 05:57:56 CEST 2021


Commit: 2c916c97ac744f5ef6ba35a6f7db68e96c4fbabc
Author: Campbell Barton
Date:   Wed Jun 23 11:58:41 2021 +1000
Branches: master
https://developer.blender.org/rB2c916c97ac744f5ef6ba35a6f7db68e96c4fbabc

Cleanup: clang-tidy quiet equals-default, nullptr warnings

===================================================================

M	source/blender/blenlib/tests/BLI_math_time_test.cc
M	source/blender/blenlib/tests/BLI_string_test.cc

===================================================================

diff --git a/source/blender/blenlib/tests/BLI_math_time_test.cc b/source/blender/blenlib/tests/BLI_math_time_test.cc
index 4743c11b95f..61a504ac2d7 100644
--- a/source/blender/blenlib/tests/BLI_math_time_test.cc
+++ b/source/blender/blenlib/tests/BLI_math_time_test.cc
@@ -20,15 +20,15 @@ TEST(math_time, SecondsExplode)
   EXPECT_NEAR(9.0, r_seconds, epsilon);
   EXPECT_NEAR(369.0, r_milliseconds, epsilon);
 
-  BLI_math_time_seconds_decompose(seconds, NULL, &r_hours, &r_minutes, &r_seconds, NULL);
+  BLI_math_time_seconds_decompose(seconds, nullptr, &r_hours, &r_minutes, &r_seconds, nullptr);
   EXPECT_NEAR(61.0, r_hours, epsilon);
   EXPECT_NEAR(33.0, r_minutes, epsilon);
   EXPECT_NEAR(9.369, r_seconds, epsilon);
 
-  BLI_math_time_seconds_decompose(seconds, NULL, NULL, NULL, &r_seconds, NULL);
+  BLI_math_time_seconds_decompose(seconds, nullptr, nullptr, nullptr, &r_seconds, nullptr);
   EXPECT_NEAR(seconds, r_seconds, epsilon);
 
-  BLI_math_time_seconds_decompose(seconds, &r_days, NULL, &r_minutes, NULL, &r_milliseconds);
+  BLI_math_time_seconds_decompose(seconds, &r_days, nullptr, &r_minutes, nullptr, &r_milliseconds);
   EXPECT_NEAR(2.0, r_days, epsilon);
   EXPECT_NEAR(813.0, r_minutes, epsilon);
   EXPECT_NEAR(9369.0, r_milliseconds, epsilon);
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index 281b7103b75..0b68ee8b93c 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -421,9 +421,7 @@ TEST(string, StrFormatByteUnits)
 }
 
 struct WordInfo {
-  WordInfo()
-  {
-  }
+  WordInfo() = default;
   WordInfo(int start, int end) : start(start), end(end)
   {
   }
@@ -441,9 +439,7 @@ static std::ostream &operator<<(std::ostream &os, const WordInfo &word_info)
 
 class StringFindSplitWords : public testing::Test {
  protected:
-  StringFindSplitWords()
-  {
-  }
+  StringFindSplitWords() = default;
 
   /* If max_words is -1 it will be initialized from the number of expected
    * words +1. This way there is no need to pass an explicit number of words,
@@ -807,9 +803,7 @@ TEST_F(StringCasecmpNatural, TextAndNumbers)
 
 class StringEscape : public testing::Test {
  protected:
-  StringEscape()
-  {
-  }
+  StringEscape() = default;
 
   using CompareWordsArray = vector<std::array<const char *, 2>>;



More information about the Bf-blender-cvs mailing list