Pārlūkot izejas kodu

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 姚伟忠 9 gadi atpakaļ
vecāks
revīzija
c675421464

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

@@ -312,13 +312,12 @@ public:
         unsigned trailingCount = size_ - shiftStartIndex;
         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);
         }
         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);
         }
         Resize(newSize, 0);
@@ -555,7 +554,7 @@ private:
             *dest++ = *src++;
     }
 
-    // Call the elements' destructors.
+    /// Call the elements' destructors.
     static void DestructElements(T* dest, unsigned count)
     {
         while (count--)
@@ -861,13 +860,12 @@ public:
         unsigned trailingCount = size_ - shiftStartIndex;
         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);
         }
         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);
         }
         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) :
         type_(rhs.type_),
         name_(rhs.name_)
@@ -591,7 +591,7 @@ public:
         return *this;
     }
 
-    // Assign from a string vector.
+    /// Assign from a string vector.
     Variant& operator =(const StringVector& rhs)
     {
         SetType(VAR_STRINGVECTOR);

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

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

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

@@ -35,7 +35,7 @@ class URHO3D_API DbResult
     friend class DbConnection;
 
 public:
-    // Default constructor constructs an empty result object.
+    /// Default constructor constructs an empty result object.
     DbResult() :
         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) :
         position_(position),
         normal_(normal)

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

@@ -52,7 +52,7 @@ public:
                 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();
         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.
     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)
     {
         if (!firstLight_)
             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
         if (maxLights_)
             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)
     {
         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.
     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_; }
     /// 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;

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

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

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

@@ -125,7 +125,7 @@ public:
 #endif
     }
 
-    // Construct from values.
+    /// Construct from values.
     Matrix3x4(float v00, float v01, float v02, float v03,
               float v10, float v11, float v12, float v13,
               float v20, float v21, float v22, float v23) :
@@ -711,8 +711,7 @@ public:
 
 #ifdef URHO3D_SSE
 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)
     {
         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,
             float v10, float v11, float v12, float v13,
             float v20, float v21, float v22, float v23,
@@ -500,7 +500,7 @@ public:
         m22_ = rotation.m22_;
     }
 
-    // Set scaling elements.
+    /// Set scaling elements.
     void SetScale(const Vector3& scale)
     {
         m00_ = scale.x_;
@@ -508,7 +508,7 @@ public:
         m22_ = scale.z_;
     }
 
-    // Set uniform scaling elements.
+    /// Set uniform scaling elements.
     void SetScale(float scale)
     {
         m00_ = scale;

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

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

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

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

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

@@ -208,7 +208,7 @@ public:
     /// Return required package files.
     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;
 
     /// 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.
 struct GlyphLocation
 {
-    // Construct.
+    /// Construct.
     GlyphLocation(int x, int y, const FontGlyph* glyph) :
         x_(x),
         y_(y),

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

@@ -351,9 +351,9 @@ public:
     void AddTags(const String& tags, char separator = ';');
     /// Add 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);
-    // Remove all tags.
+    /// Remove all tags.
     void RemoveAllTags();
 
     /// 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.
     virtual void DrawDebugGeometry(DebugRenderer* debug, bool depthTest);
 
-    // Implement b2ContactListener.
+    // Implement b2ContactListener
     /// Called when two fixtures begin to touch.
     virtual void BeginContact(b2Contact* contact);
     /// Called when two fixtures cease to touch.
     virtual void EndContact(b2Contact* contact);
 
-    // Implement b2Draw.
+    // Implement b2Draw
     /// Draw a closed polygon provided in CCW order.
     virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color);
     /// 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 pivotY_;
 
-    // Run time data.
+    /// Run time data.
     int zIndex_;
 
     SpriteTimelineKey(Timeline* timeline);

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

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