[Bf-blender-cvs] [31b7a53605d] soc-2020-io-performance: Cleanup: fix grammar in comments.

Ankit Meel noreply at git.blender.org
Wed Jul 22 11:24:16 CEST 2020


Commit: 31b7a53605da13f2bd32c89a85242d726e893a2b
Author: Ankit Meel
Date:   Wed Jul 22 14:53:47 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB31b7a53605da13f2bd32c89a85242d726e893a2b

Cleanup: fix grammar in comments.

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

M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_mesh.cc
M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.cc
M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.hh
M	source/blender/io/wavefront_obj/intern/wavefront_obj_im_objects.hh

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

diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
index c66616babcf..ac07a73cd6e 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_file_reader.cc
@@ -108,9 +108,9 @@ BLI_INLINE void copy_string_to_int(const string &src, int &r_dst)
 }
 
 /**
- * Convert the given string to int and assign it to the destination value.
+ * Convert the given strings to ints and fill the destination int buffer.
  *
- * Catches exception if the string cannot be converted to an integer. The destination
+ * Catches exception if a string cannot be converted to an integer. The destination
  *  int is set to <TODO ankitm: indices can be -1 too!> in that case.
  */
 BLI_INLINE void copy_string_to_int(Span<string> src, MutableSpan<int> r_dst)
@@ -132,7 +132,7 @@ BLI_INLINE void copy_string_to_int(Span<string> src, MutableSpan<int> r_dst)
 static bool should_create_new_curve(std::unique_ptr<OBJRawObject> *raw_object)
 {
   if (raw_object) {
-    /* After the creation of an raw object, at least one element has been found in the OBJ file
+    /* After the creation of a raw object, at least one element has been found in the OBJ file
      * that indicates that this is a mesh, not a curve. */
     if ((*raw_object)->face_elements.size() || (*raw_object)->uv_vertex_indices.size() ||
         (*raw_object)->tot_normals) {
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mesh.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mesh.cc
index 583b76eb35b..8bb30d2fb35 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mesh.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mesh.cc
@@ -71,7 +71,7 @@ OBJMeshFromRaw::OBJMeshFromRaw(const OBJRawObject &curr_object,
     mesh_from_ob_->medge[i].v2 = curr_edge.v2;
   }
 
-  /* Set parameter `update` to true so that existing explicitly imported edges can be merged
+  /* Set argument `update` to true so that existing explicitly imported edges can be merged
    * with the new ones created from polygons. */
   BKE_mesh_calc_edges(mesh_from_ob_.get(), true, false);
   BKE_mesh_calc_edges_loose(mesh_from_ob_.get());
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.cc
index 2bfb4b31a24..4d7f4b3e9a7 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.cc
@@ -28,7 +28,7 @@
 
 namespace blender::io::obj {
 /**
- * Edit the NURBS curve of the curve converted from raw object.
+ * Edit the NURBS spline of the curve converted from raw object.
  */
 void OBJCurveFromRaw::edit_nurbs(const OBJRawObject &curr_object,
                                  const GlobalVertices &global_vertices)
@@ -82,7 +82,7 @@ OBJCurveFromRaw::OBJCurveFromRaw(Main *bmain,
                                  const OBJRawObject &curr_object,
                                  const GlobalVertices global_vertices)
 {
-  /* Set curve specific parameters. */
+  /* Set curve specific settings. */
   curve_from_ob_.reset(BKE_curve_add(bmain, curr_object.object_name.c_str(), OB_CURVE));
   curve_from_ob_->flag = CU_3D;
   curve_from_ob_->resolu = curve_from_ob_->resolv = 12;
@@ -90,7 +90,7 @@ OBJCurveFromRaw::OBJCurveFromRaw(Main *bmain,
   Nurb *nurb = (Nurb *)MEM_callocN(sizeof(Nurb), "OBJ import NURBS curve");
   BLI_addtail(BKE_curve_nurbs_get(curve_from_ob_.get()), nurb);
 
-  /* Set NURBS specific parameters. */
+  /* Set NURBS specific settings. */
   edit_nurbs(curr_object, global_vertices);
 }
 }  // namespace blender::io::obj
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.hh b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.hh
index a588803b54e..cd4ebdffda3 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.hh
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_nurbs.hh
@@ -35,6 +35,7 @@ namespace blender::io::obj {
 class OBJRawObject;
 struct GlobalVertices;
 
+/** Free a curve's memory using Blender's memory management. */
 struct UniqueCurveDeleter {
   void operator()(Curve *curve)
   {
@@ -44,8 +45,8 @@ struct UniqueCurveDeleter {
   }
 };
 
-/* An unique_ptr to a Curve with a custom deleter to deallocate memory using Blender memory
- * management. */
+/** An unique_ptr to a Curve with a custom deleter. Don't let unique_ptr free a curve with a
+ * different deallocator. */
 using unique_curve_ptr = std::unique_ptr<Curve, UniqueCurveDeleter>;
 
 class OBJCurveFromRaw : NonMovable, NonCopyable {
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_objects.hh b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_objects.hh
index 79bf5fd1a4b..bee5b2dcdda 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_objects.hh
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_objects.hh
@@ -56,7 +56,7 @@ typedef struct OBJFaceElem {
 } OBJFaceElem;
 
 /**
- * Contains parameters for one single NURBS curve in the OBJ file.
+ * Contains data for one single NURBS curve in the OBJ file.
  */
 struct NurbsElem {
   /**



More information about the Bf-blender-cvs mailing list