Commit: cd92b2350fc20f6c91128881b5fd20dd173d2308 Author: Campbell Barton Date: Wed Aug 4 13:26:47 2021 +1000 Branches: master https://developer.blender.org/rBcd92b2350fc20f6c91128881b5fd20dd173d2308
Cleanup: use C comments for descriptive text =================================================================== M intern/ghost/intern/GHOST_ContextGLX.cpp M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_WindowX11.cpp M source/blender/blenkernel/intern/armature_test.cc M source/blender/blenkernel/intern/softbody.c M source/blender/blenkernel/intern/text.c M source/blender/blenlib/BLI_winstuff.h M source/blender/blenlib/intern/path_util.c M source/blender/blenloader/intern/versioning_290.c M source/blender/compositor/nodes/COM_MaskNode.cc M source/blender/compositor/nodes/COM_MovieClipNode.cc M source/blender/compositor/operations/COM_DilateErodeOperation.cc M source/blender/compositor/operations/COM_OutputFileOperation.cc M source/blender/compositor/operations/COM_WrapOperation.cc M source/blender/depsgraph/DEG_depsgraph.h M source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl M source/blender/imbuf/intern/dds/ColorBlock.h M source/blender/imbuf/intern/openexr/openexr_api.cpp M source/blender/windowmanager/intern/wm_window.c =================================================================== diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp index eb49dc4f98b..78c7201ff5f 100644 --- a/intern/ghost/intern/GHOST_ContextGLX.cpp +++ b/intern/ghost/intern/GHOST_ContextGLX.cpp @@ -295,8 +295,8 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext() glXMakeCurrent(m_display, m_window, m_context); - // Seems that this has to be called after MakeCurrent, - // which means we cannot use glX extensions until after we create a context + /* Seems that this has to be called after #glXMakeCurrent, + * which means we cannot use `glX` extensions until after we create a context. */ initContextGLXEW(); if (m_window) { diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 9fcad8aabf7..9422d15692d 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -802,8 +802,7 @@ static bool checkTabletProximity(Display *display, XDevice *device) if (state) { XInputClass *cls = state->data; - // printf("%d class%s :\n", state->num_classes, - // (state->num_classes > 1) ? "es" : ""); + // printf("%d class%s :\n", state->num_classes, (state->num_classes > 1) ? "es" : ""); for (int loop = 0; loop < state->num_classes; loop++) { switch (cls->c_class) { case ValuatorClass: diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 185d12717e7..de389951613 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1275,15 +1275,15 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type { if (type == GHOST_kDrawingContextTypeOpenGL) { - // During development: - // try 4.x compatibility profile - // try 3.3 compatibility profile - // fall back to 3.0 if needed - // - // Final Blender 2.8: - // try 4.x core profile - // try 3.3 core profile - // no fallbacks + /* During development: + * - Try 4.x compatibility profile. + * - Try 3.3 compatibility profile. + * - Fall back to 3.0 if needed. + * + * Final Blender 2.8: + * - Try 4.x core profile + * - Try 3.3 core profile + * - No fall-backs. */ #if defined(WITH_GL_PROFILE_CORE) { diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc index 47853deec3e..99eb064d061 100644 --- a/source/blender/blenkernel/intern/armature_test.cc +++ b/source/blender/blenkernel/intern/armature_test.cc @@ -180,7 +180,7 @@ class BKE_armature_find_selected_bones_test : public testing::Test { BLI_addtail(&arm.bonebase, &bone2); // bone2 is root bone BLI_addtail(&bone2.childbase, &bone3); // bone3 has bone2 as parent - // Make sure the armature & its bones are visible, to make them selectable. + /* Make sure the armature & its bones are visible, to make them selectable. */ arm.layer = bone1.layer = bone2.layer = bone3.layer = 1; } }; @@ -200,8 +200,8 @@ TEST_F(BKE_armature_find_selected_bones_test, some_bones_selected) EXPECT_EQ(seen_bones[0], &bone1); EXPECT_EQ(seen_bones[1], &bone3); - EXPECT_FALSE(result.all_bones_selected); // Bone 2 was not selected. - EXPECT_FALSE(result.no_bones_selected); // Bones 1 and 3 were selected. + EXPECT_FALSE(result.all_bones_selected); /* Bone 2 was not selected. */ + EXPECT_FALSE(result.no_bones_selected); /* Bones 1 and 3 were selected. */ } TEST_F(BKE_armature_find_selected_bones_test, no_bones_selected) diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 1a408aceeb2..f41251f6ea5 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3447,10 +3447,10 @@ static void softbody_step( float newtime = forcetime * 1.1f; /* hope for 1.1 times better conditions in next step */ if (sb->scratch->flag & SBF_DOFUZZY) { - ///* stay with this stepsize unless err really small */ + // /* stay with this stepsize unless err really small */ // if (err > SoftHeunTol/(2.0f*sb->fuzzyness)) { newtime = forcetime; - //} + // } } else { if (err > SoftHeunTol / 2.0f) { /* stay with this stepsize unless err really small */ diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 80ff8ce9162..6048e823abb 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2331,7 +2331,7 @@ int txt_setcurr_tab_spaces(Text *text, int space) } while (text->curl->line[i] == indent) { - // we only count those tabs/spaces that are before any text or before the curs; + /* We only count those tabs/spaces that are before any text or before the curs; */ if (i == text->curc) { return i; } diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 0953e3f1946..bf09b56c779 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -45,7 +45,7 @@ #undef small -// These definitions are also in BLI_math for simplicity +/* These definitions are also in BLI_math for simplicity. */ #ifdef __cplusplus extern "C" { @@ -72,7 +72,7 @@ extern "C" { #if defined(_MSC_VER) # define R_OK 4 # define W_OK 2 -// not accepted by access() on windows +/* Not accepted by `access()` on windows. */ //# define X_OK 1 # define F_OK 0 #endif diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 99fae1f1616..4d0678035ba 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1102,12 +1102,9 @@ bool BLI_path_abs(char *path, const char *basepath) } #ifdef WIN32 - /* skip first two chars, which in case of - * absolute path will be drive:/blabla and - * in case of relpath //blabla/. So relpath - * // will be retained, rest will be nice and - * shiny win32 backward slashes :) -jesterKing - */ + /* NOTE(@jesterking): Skip first two chars, which in case of absolute path will + * be `drive:/blabla` and in case of `relpath` `//blabla/`. + * So `relpath` `//` will be retained, rest will be nice and shiny WIN32 backward slashes. */ BLI_str_replace_char(path + 2, '/', '\\'); #endif diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 09d43676b8f..7f7a2d97cbb 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -170,7 +170,7 @@ static void seq_convert_transform_crop(const Scene *scene, int image_size_x = scene->r.xsch; int image_size_y = scene->r.ysch; - /* Hardcoded legacy bit-flags which has been removed. */ + /* Hard-coded legacy bit-flags which has been removed. */ const uint32_t use_transform_flag = (1 << 16); const uint32_t use_crop_flag = (1 << 17); diff --git a/source/blender/compositor/nodes/COM_MaskNode.cc b/source/blender/compositor/nodes/COM_MaskNode.cc index ef171c01653..b5b23798160 100644 --- a/source/blender/compositor/nodes/COM_MaskNode.cc +++ b/source/blender/compositor/nodes/COM_MaskNode.cc @@ -41,7 +41,7 @@ void MaskNode::convertToOperations(NodeConverter &converter, NodeMask *data = (NodeMask *)editorNode->storage; Mask *mask = (Mask *)editorNode->id; - // always connect the output image + /* Always connect the output image. */ MaskOperation *operation = new MaskOperation(); if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED) { diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cc b/source/blender/compositor/nodes/COM_MovieClipNode.cc index 50bd9b4d71b..b80071d27c7 100644 --- a/source/blender/compositor/nodes/COM_MovieClipNode.cc +++ b/source/blender/compositor/nodes/COM_MovieClipNode.cc @@ -62,7 +62,7 @@ void MovieClipNode::convertToOperations(NodeConverter &converter, } } - // always connect the output image + /* Always connect the output image. */ MovieClipOperation *operation = new MovieClipOperation(); operation->setMovieClip(movieClip); operation->setMovieClipUser(movieClipUser); diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cc b/source/blender/compositor/operations/COM_DilateErodeOperation.cc index 2454f507664..e9305e0e192 100644 --- a/source/blender/compositor/operations/COM_DilateErodeOperation.cc +++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cc @@ -24,7 +24,7 @@ namespace blender::compositor { -// DilateErode Distance Threshold +/* DilateErode Distance Threshold */ DilateErodeThresholdOperation::DilateErodeThresholdOperation() { this->addInputSocket(DataType::Value); @@ -258,7 +258,7 @@ void DilateDistanceOperation::executeOpenCL(OpenCLDevice *device, device->COM_clEnqueueRange(dilateKernel, outputMemoryBuffer, 7, this); } -// Erode Distance +/* Erode Distance */ ErodeDistanceOperation::ErodeDistanceOperation() : DilateDistanceOperation() { /* pass */ @@ -318,7 +318,7 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device, device->COM_clEnqueueRange(erodeKernel, outputMemoryBuffer, 7, this); } -// Dilate step +/* Dilate step */ DilateStepOperation::DilateStepOperation() { this->addInputSocket(DataType::Value); @@ -331,7 +331,7 @@ void DilateStepOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -// small helper to pass data from initializeTileData to executePixel +/* Small helper to pass data from initializeTileData to executePixel. */ struct tile_info { rcti rect; int width; @@ -370,21 +370,21 @@ void *DilateStepOperation::initializeTileData(rcti *rect) int bwidth = rect->xmax - rect->xmin; int bheight = rect->ymax - rect->ymin; - // NOTE: Cache buffer has original tilesize width, but new height. - // We have to calculate the additional rows in the first pass, - // to have valid data available for the second pass. + /* NOTE: Cache buffer @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs