瀏覽代碼

Add doc + small unittest

Kim Kulling 3 年之前
父節點
當前提交
362ff08855
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 1
      code/Common/Maybe.h
  2. 1 0
      test/CMakeLists.txt

+ 2 - 1
code/Common/Maybe.h

@@ -63,7 +63,7 @@ struct Maybe {
     }
     }
 
 
     /// @brief Will assign a value.
     /// @brief Will assign a value.
-    /// @param v The enw valid value.
+    /// @param v The new valid value.
     void Set(T &v) {
     void Set(T &v) {
         ai_assert(!_valid);
         ai_assert(!_valid);
 
 
@@ -79,6 +79,7 @@ struct Maybe {
     }
     }
 
 
     Maybe &operator&() = delete;
     Maybe &operator&() = delete;
+    Maybe(const Maybe &) = delete;
 
 
 private:
 private:
     T _val;
     T _val;

+ 1 - 0
test/CMakeLists.txt

@@ -89,6 +89,7 @@ SET( COMMON
   unit/utProfiler.cpp
   unit/utProfiler.cpp
   unit/utSharedPPData.cpp
   unit/utSharedPPData.cpp
   unit/utStringUtils.cpp
   unit/utStringUtils.cpp
+  unit/Common/utMaybe.cpp
   unit/Common/utMesh.cpp
   unit/Common/utMesh.cpp
   unit/Common/utStandardShapes.cpp
   unit/Common/utStandardShapes.cpp
   unit/Common/uiScene.cpp
   unit/Common/uiScene.cpp