瀏覽代碼

Address SonarLint findings in TestDataCar class

Patrick-Christopher Mattulat 1 年之前
父節點
當前提交
1a1c3e6e65
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      test/classes/event/TestDataCar.cpp
  2. 2 2
      test/classes/event/TestDataCar.hpp

+ 2 - 2
test/classes/event/TestDataCar.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2023-05-15
+ * Changed:         2023-05-18
  *
  * */
 
@@ -17,7 +17,7 @@ TestDataCar::TestDataCar() : color("white")
 
 TestDataCar::~TestDataCar() = default;
 
-string_view TestDataCar::getColor()
+string_view TestDataCar::getColor() const
 {
   return this->color;
 }

+ 2 - 2
test/classes/event/TestDataCar.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-14
- * Changed:         2023-05-15
+ * Changed:         2023-05-18
  *
  * */
 
@@ -22,7 +22,7 @@ namespace test::event
       TestDataCar();
       virtual ~TestDataCar();
 
-      [[nodiscard]] ::std::string_view getColor();
+      [[nodiscard]] ::std::string_view getColor() const;
       void setColor(::std::string_view _color);
 
     private: