Quellcode durchsuchen

Normal comment to doxygen comment using regex + manual correction.

cd Source/Urho3D && git grep -lP '^\s+//[^/]+\.^M*$' -- '*.h' |xargs perl -pi -e 's|^(\s+)//([^/]+\.^M*)$|$1///$2|g'
Ctrl+M is one character.
Yao Wei Tjong 姚伟忠 vor 9 Jahren
Ursprung
Commit
c675421464

+ 5 - 7
Source/Urho3D/Container/Vector.h

@@ -312,13 +312,12 @@ public:
         unsigned trailingCount = size_ - shiftStartIndex;
         unsigned trailingCount = size_ - shiftStartIndex;
         if (trailingCount <= length)
         if (trailingCount <= length)
         {
         {
-            // We're removing more elements from the array than exist past the end of the range being removed, so
-            // perform a normal shift and destroy.
+            // We're removing more elements from the array than exist past the end of the range being removed, so perform a normal shift and destroy
             MoveRange(pos, shiftStartIndex, trailingCount);
             MoveRange(pos, shiftStartIndex, trailingCount);
         }
         }
         else
         else
         {
         {
-            // Swap elements from the end of the array into the empty space.
+            // Swap elements from the end of the array into the empty space
             CopyElements(Buffer() + pos, Buffer() + newSize, length);
             CopyElements(Buffer() + pos, Buffer() + newSize, length);
         }
         }
         Resize(newSize, 0);
         Resize(newSize, 0);
@@ -555,7 +554,7 @@ private:
             *dest++ = *src++;
             *dest++ = *src++;
     }
     }
 
 
-    // Call the elements' destructors.
+    /// Call the elements' destructors.
     static void DestructElements(T* dest, unsigned count)
     static void DestructElements(T* dest, unsigned count)
     {
     {
         while (count--)
         while (count--)
@@ -861,13 +860,12 @@ public:
         unsigned trailingCount = size_ - shiftStartIndex;
         unsigned trailingCount = size_ - shiftStartIndex;
         if (trailingCount <= length)
         if (trailingCount <= length)
         {
         {
-            // We're removing more elements from the array than exist past the end of the range being removed, so
-            // perform a normal shift and destroy.
+            // We're removing more elements from the array than exist past the end of the range being removed, so perform a normal shift and destroy
             MoveRange(pos, shiftStartIndex, trailingCount);
             MoveRange(pos, shiftStartIndex, trailingCount);
         }
         }
         else
         else
         {
         {
-            // Swap elements from the end of the array into the empty space.
+            // Swap elements from the end of the array into the empty space
             CopyElements(Buffer() + pos, Buffer() + newSize, length);
             CopyElements(Buffer() + pos, Buffer() + newSize, length);
         }
         }
         Resize(newSize);
         Resize(newSize);

+ 2 - 2
Source/Urho3D/Core/Variant.h

@@ -143,7 +143,7 @@ struct URHO3D_API ResourceRef
     {
     {
     }
     }
 
 
-    // Construct from another ResourceRef.
+    /// Construct from another ResourceRef.
     ResourceRef(const ResourceRef& rhs) :
     ResourceRef(const ResourceRef& rhs) :
         type_(rhs.type_),
         type_(rhs.type_),
         name_(rhs.name_)
         name_(rhs.name_)
@@ -591,7 +591,7 @@ public:
         return *this;
         return *this;
     }
     }
 
 
-    // Assign from a string vector.
+    /// Assign from a string vector.
     Variant& operator =(const StringVector& rhs)
     Variant& operator =(const StringVector& rhs)
     {
     {
         SetType(VAR_STRINGVECTOR);
         SetType(VAR_STRINGVECTOR);

+ 1 - 1
Source/Urho3D/Database/ODBC/ODBCResult.h

@@ -35,7 +35,7 @@ class URHO3D_API DbResult
     friend class DbConnection;
     friend class DbConnection;
 
 
 public:
 public:
-    // Default constructor constructs an empty result object.
+    /// Default constructor constructs an empty result object.
     DbResult() :
     DbResult() :
         numAffectedRows_(-1)
         numAffectedRows_(-1)
     {
     {

+ 1 - 1
Source/Urho3D/Database/SQLite/SQLiteResult.h

@@ -35,7 +35,7 @@ class URHO3D_API DbResult
     friend class DbConnection;
     friend class DbConnection;
 
 
 public:
 public:
-    // Default constructor constructs an empty result object.
+    /// Default constructor constructs an empty result object.
     DbResult() :
     DbResult() :
         numAffectedRows_(-1)
         numAffectedRows_(-1)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/DecalSet.h

@@ -48,7 +48,7 @@ struct DecalVertex
     {
     {
     }
     }
 
 
-    // Construct with position, normal and skinning information.
+    /// Construct with position, normal and skinning information.
     DecalVertex(const Vector3& position, const Vector3& normal, const float* blendWeights, const unsigned char* blendIndices) :
     DecalVertex(const Vector3& position, const Vector3& normal, const float* blendWeights, const unsigned char* blendIndices) :
         position_(position),
         position_(position),
         normal_(normal)
         normal_(normal)

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11ShaderProgram.h

@@ -52,7 +52,7 @@ public:
                 psConstantBuffers_[i] = graphics->GetOrCreateConstantBuffer(PS, i, psBufferSizes[i]);
                 psConstantBuffers_[i] = graphics->GetOrCreateConstantBuffer(PS, i, psBufferSizes[i]);
         }
         }
 
 
-        // Copy parameters. Add direct links to constant buffers.
+        // Copy parameters, add direct links to constant buffers
         const HashMap<StringHash, ShaderParameter>& vsParams = vertexShader->GetParameters();
         const HashMap<StringHash, ShaderParameter>& vsParams = vertexShader->GetParameters();
         for (HashMap<StringHash, ShaderParameter>::ConstIterator i = vsParams.Begin(); i != vsParams.End(); ++i)
         for (HashMap<StringHash, ShaderParameter>::ConstIterator i = vsParams.Begin(); i != vsParams.End(); ++i)
         {
         {

+ 3 - 3
Source/Urho3D/Graphics/Drawable.h

@@ -283,19 +283,19 @@ public:
     /// Return the maximum view-space depth.
     /// Return the maximum view-space depth.
     float GetMaxZ() const { return maxZ_; }
     float GetMaxZ() const { return maxZ_; }
 
 
-    // Add a per-pixel light affecting the object this frame.
+    /// Add a per-pixel light affecting the object this frame.
     void AddLight(Light* light)
     void AddLight(Light* light)
     {
     {
         if (!firstLight_)
         if (!firstLight_)
             firstLight_ = light;
             firstLight_ = light;
 
 
-        // Need to store into the light list only if the per-pixel lights are being limited.
+        // Need to store into the light list only if the per-pixel lights are being limited
         // Otherwise recording the first light is enough
         // Otherwise recording the first light is enough
         if (maxLights_)
         if (maxLights_)
             lights_.Push(light);
             lights_.Push(light);
     }
     }
 
 
-    // Add a per-vertex light affecting the object this frame.
+    /// Add a per-vertex light affecting the object this frame.
     void AddVertexLight(Light* light)
     void AddVertexLight(Light* light)
     {
     {
         vertexLights_.Push(light);
         vertexLights_.Push(light);

+ 1 - 1
Source/Urho3D/Graphics/Texture2DArray.h

@@ -67,7 +67,7 @@ public:
     /// Set data of one layer from an image. Return true if successful. Optionally make a single channel image alpha-only.
     /// Set data of one layer from an image. Return true if successful. Optionally make a single channel image alpha-only.
     bool SetData(unsigned layer, Image* image, bool useAlpha = false);
     bool SetData(unsigned layer, Image* image, bool useAlpha = false);
 
 
-    // Return number of layers in the texture.
+    /// Return number of layers in the texture.
     unsigned GetLayers() const { return layers_; }
     unsigned GetLayers() const { return layers_; }
     /// Get data from a mip level. The destination buffer must be big enough. Return true if successful.
     /// Get data from a mip level. The destination buffer must be big enough. Return true if successful.
     bool GetData(unsigned layer, unsigned level, void* dest) const;
     bool GetData(unsigned layer, unsigned level, void* dest) const;

+ 1 - 1
Source/Urho3D/LuaScript/LuaScriptInstance.h

@@ -165,7 +165,7 @@ private:
     /// Release the script object.
     /// Release the script object.
     void ReleaseObject();
     void ReleaseObject();
 
 
-    // Lua Script subsystem.
+    /// Lua Script subsystem.
     LuaScript* luaScript_;
     LuaScript* luaScript_;
     /// Lua state.
     /// Lua state.
     lua_State* luaState_;
     lua_State* luaState_;

+ 2 - 3
Source/Urho3D/Math/Matrix3x4.h

@@ -125,7 +125,7 @@ public:
 #endif
 #endif
     }
     }
 
 
-    // Construct from values.
+    /// Construct from values.
     Matrix3x4(float v00, float v01, float v02, float v03,
     Matrix3x4(float v00, float v01, float v02, float v03,
               float v10, float v11, float v12, float v13,
               float v10, float v11, float v12, float v13,
               float v20, float v21, float v22, float v23) :
               float v20, float v21, float v22, float v23) :
@@ -711,8 +711,7 @@ public:
 
 
 #ifdef URHO3D_SSE
 #ifdef URHO3D_SSE
 private:
 private:
-    // Sets this matrix from the given translation, rotation (as quaternion (w,x,y,z)), and nonuniform scale (x,y,z) parameters.
-    // Note: the w component of the scale parameter passed to this function must be 1.
+    /// \brief Sets this matrix from the given translation, rotation (as quaternion (w,x,y,z)), and nonuniform scale (x,y,z) parameters. Note: the w component of the scale parameter passed to this function must be 1.
     void inline SetFromTRS(__m128 t, __m128 q, __m128 s)
     void inline SetFromTRS(__m128 t, __m128 q, __m128 s)
     {
     {
         q = _mm_shuffle_ps(q, q, _MM_SHUFFLE(0, 3, 2, 1));
         q = _mm_shuffle_ps(q, q, _MM_SHUFFLE(0, 3, 2, 1));

+ 3 - 3
Source/Urho3D/Math/Matrix4.h

@@ -117,7 +117,7 @@ public:
     {
     {
     }
     }
 
 
-    // Construct from values.
+    /// Construct from values.
     Matrix4(float v00, float v01, float v02, float v03,
     Matrix4(float v00, float v01, float v02, float v03,
             float v10, float v11, float v12, float v13,
             float v10, float v11, float v12, float v13,
             float v20, float v21, float v22, float v23,
             float v20, float v21, float v22, float v23,
@@ -500,7 +500,7 @@ public:
         m22_ = rotation.m22_;
         m22_ = rotation.m22_;
     }
     }
 
 
-    // Set scaling elements.
+    /// Set scaling elements.
     void SetScale(const Vector3& scale)
     void SetScale(const Vector3& scale)
     {
     {
         m00_ = scale.x_;
         m00_ = scale.x_;
@@ -508,7 +508,7 @@ public:
         m22_ = scale.z_;
         m22_ = scale.z_;
     }
     }
 
 
-    // Set uniform scaling elements.
+    /// Set uniform scaling elements.
     void SetScale(float scale)
     void SetScale(float scale)
     {
     {
         m00_ = scale;
         m00_ = scale;

+ 8 - 8
Source/Urho3D/Resource/PListFile.h

@@ -53,21 +53,21 @@ typedef Vector<PListValue> PListValueVector;
 class URHO3D_API PListValue
 class URHO3D_API PListValue
 {
 {
 public:
 public:
-    // Construct.
+    /// Construct.
     PListValue();
     PListValue();
-    // Construct from int.
+    /// Construct from int.
     PListValue(int value);
     PListValue(int value);
-    // Construct from boolean.
+    /// Construct from boolean.
     PListValue(bool value);
     PListValue(bool value);
-    // Construct from float.
+    /// Construct from float.
     PListValue(float value);
     PListValue(float value);
-    // Construct from string.
+    /// Construct from string.
     PListValue(const String& value);
     PListValue(const String& value);
-    // Construct from value map.
+    /// Construct from value map.
     PListValue(PListValueMap& valueMap);
     PListValue(PListValueMap& valueMap);
-    // Construct from value vector.
+    /// Construct from value vector.
     PListValue(PListValueVector& valueVector);
     PListValue(PListValueVector& valueVector);
-    // Construct from another value.
+    /// Construct from another value.
     PListValue(const PListValue& value);
     PListValue(const PListValue& value);
     /// Destruct.
     /// Destruct.
     ~PListValue();
     ~PListValue();

+ 1 - 1
Source/Urho3D/Resource/XMLElement.h

@@ -303,7 +303,7 @@ public:
     XPathResultSet();
     XPathResultSet();
     /// Construct with result set from XPath query.
     /// Construct with result set from XPath query.
     XPathResultSet(XMLFile* file, pugi::xpath_node_set* resultSet);
     XPathResultSet(XMLFile* file, pugi::xpath_node_set* resultSet);
-    // Copy-construct.
+    /// Copy-construct.
     XPathResultSet(const XPathResultSet& rhs);
     XPathResultSet(const XPathResultSet& rhs);
     /// Destruct.
     /// Destruct.
     ~XPathResultSet();
     ~XPathResultSet();

+ 1 - 1
Source/Urho3D/Scene/Scene.h

@@ -208,7 +208,7 @@ public:
     /// Return required package files.
     /// Return required package files.
     const Vector<SharedPtr<PackageFile> >& GetRequiredPackageFiles() const { return requiredPackageFiles_; }
     const Vector<SharedPtr<PackageFile> >& GetRequiredPackageFiles() const { return requiredPackageFiles_; }
 
 
-    // Return a node user variable name, or empty if not registered.
+    /// Return a node user variable name, or empty if not registered.
     const String& GetVarName(StringHash hash) const;
     const String& GetVarName(StringHash hash) const;
 
 
     /// Update scene. Called by HandleUpdate.
     /// Update scene. Called by HandleUpdate.

+ 1 - 1
Source/Urho3D/UI/Text.h

@@ -53,7 +53,7 @@ struct CharLocation
 /// Glyph and its location within the text. Used when preparing text rendering.
 /// Glyph and its location within the text. Used when preparing text rendering.
 struct GlyphLocation
 struct GlyphLocation
 {
 {
-    // Construct.
+    /// Construct.
     GlyphLocation(int x, int y, const FontGlyph* glyph) :
     GlyphLocation(int x, int y, const FontGlyph* glyph) :
         x_(x),
         x_(x),
         y_(y),
         y_(y),

+ 2 - 2
Source/Urho3D/UI/UIElement.h

@@ -351,9 +351,9 @@ public:
     void AddTags(const String& tags, char separator = ';');
     void AddTags(const String& tags, char separator = ';');
     /// Add tags.
     /// Add tags.
     void AddTags(const StringVector& tags);
     void AddTags(const StringVector& tags);
-    // Remove specific tag. Return true if existed.
+    /// Remove specific tag. Return true if existed.
     bool RemoveTag(const String& tag);
     bool RemoveTag(const String& tag);
-    // Remove all tags.
+    /// Remove all tags.
     void RemoveAllTags();
     void RemoveAllTags();
 
 
     /// Template version of creating a child element.
     /// Template version of creating a child element.

+ 2 - 2
Source/Urho3D/Urho2D/PhysicsWorld2D.h

@@ -86,13 +86,13 @@ public:
     /// Visualize the component as debug geometry.
     /// Visualize the component as debug geometry.
     virtual void DrawDebugGeometry(DebugRenderer* debug, bool depthTest);
     virtual void DrawDebugGeometry(DebugRenderer* debug, bool depthTest);
 
 
-    // Implement b2ContactListener.
+    // Implement b2ContactListener
     /// Called when two fixtures begin to touch.
     /// Called when two fixtures begin to touch.
     virtual void BeginContact(b2Contact* contact);
     virtual void BeginContact(b2Contact* contact);
     /// Called when two fixtures cease to touch.
     /// Called when two fixtures cease to touch.
     virtual void EndContact(b2Contact* contact);
     virtual void EndContact(b2Contact* contact);
 
 
-    // Implement b2Draw.
+    // Implement b2Draw
     /// Draw a closed polygon provided in CCW order.
     /// Draw a closed polygon provided in CCW order.
     virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
     virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
     /// Draw a solid closed polygon provided in CCW order.
     /// Draw a solid closed polygon provided in CCW order.

+ 1 - 1
Source/Urho3D/Urho2D/SpriterData2D.h

@@ -293,7 +293,7 @@ struct SpriteTimelineKey : SpatialTimelineKey
     float pivotX_;
     float pivotX_;
     float pivotY_;
     float pivotY_;
 
 
-    // Run time data.
+    /// Run time data.
     int zIndex_;
     int zIndex_;
 
 
     SpriteTimelineKey(Timeline* timeline);
     SpriteTimelineKey(Timeline* timeline);

+ 1 - 1
Source/Urho3D/Urho2D/SpriterInstance2D.h

@@ -66,7 +66,7 @@ public:
 
 
     /// Return current entity.
     /// Return current entity.
     Entity* GetEntity() const { return entity_; }
     Entity* GetEntity() const { return entity_; }
-    // Return current animation.
+    /// Return current animation.
     Animation* GetAnimation() const { return animation_; }
     Animation* GetAnimation() const { return animation_; }
     /// Return root spatial info.
     /// Return root spatial info.
     const SpatialInfo& GetSpatialInfo() const { return spatialInfo_; }
     const SpatialInfo& GetSpatialInfo() const { return spatialInfo_; }