Commit: d7ca53963c1b591af62c8b748cfe981124990bb6
Author: Mateusz Grzeliński
Date:   Mon Aug 3 17:34:57 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBd7ca53963c1b591af62c8b748cfe981124990bb6

CLOG: rename macro

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

M       intern/clog/CLG_log.h
M       source/blender/blenkernel/intern/CCGSubSurf_legacy.c
M       source/blender/blenkernel/intern/curveprofile.c
M       source/blender/blenkernel/intern/pointcache.c
M       source/blender/editors/undo/ed_undo.c
M       source/blender/windowmanager/intern/wm_window.c

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

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 37f5625a254..9553887a9de 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -216,7 +216,8 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
 #  define CLOG_DEBUG_CHECK_IN_USE(clg_ref) false
 #endif  // DEBUG
 
-#define CLOG_CHECK_VERBOSITY(clg_ref, verbose_level, ...) \
+/** check verbosity/debug level when using severity DEBUG/VERBOSE */
+#define CLOG_CHECK_LEVEL(clg_ref, verbose_level, ...) \
   (CLOG_CHECK_IN_USE(clg_ref) && ((clg_ref)->type->severity_level <= 
CLG_SEVERITY_VERBOSE) && \
    ((clg_ref)->type->verbosity_level >= verbose_level))
 
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c 
b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
index d506a75e872..b1772c809fb 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
@@ -1304,7 +1304,7 @@ void ccgSubSurf__sync_legacy(CCGSubSurf *ss)
   MEM_freeN(effectedE);
   MEM_freeN(effectedV);
 
-  if (CLOG_CHECK_VERBOSITY(BKE_LOG_SUBSURF_DUMP_COORDS, 2)) {
+  if (CLOG_CHECK_LEVEL(BKE_LOG_SUBSURF_DUMP_COORDS, 2)) {
     CLOG_VERBOSE(BKE_LOG_SUBSURF_DUMP_COORDS, 2, "Dump subsufr %p", ss);
     ccgSubSurf__dumpCoords(ss);
   }
diff --git a/source/blender/blenkernel/intern/curveprofile.c 
b/source/blender/blenkernel/intern/curveprofile.c
index 1870b3f2c8d..9d38b7a11ef 100644
--- a/source/blender/blenkernel/intern/curveprofile.c
+++ b/source/blender/blenkernel/intern/curveprofile.c
@@ -863,7 +863,7 @@ void BKE_curveprofile_create_samples(CurveProfile *profile,
     BLI_assert(i_sample <= n_segments);
   }
 
-  if (CLOG_CHECK_VERBOSITY(&BKE_LOG_CURVEPROFILE_TABLE, 2)) {
+  if (CLOG_CHECK_LEVEL(&BKE_LOG_CURVEPROFILE_TABLE, 2)) {
     DynStr *message = BLI_dynstr_new();
     BLI_dynstr_appendf(message,
                        "CURVEPROFILE CREATE SAMPLES\n"
diff --git a/source/blender/blenkernel/intern/pointcache.c 
b/source/blender/blenkernel/intern/pointcache.c
index 4d466dc75cd..8fceb0c0b7d 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -4160,7 +4160,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
       baker->update_progress(baker->bake_job, progress, &cancel);
     }
 
-    if (CLOG_CHECK_VERBOSITY(&LOG, 2)) {
+    if (CLOG_CHECK_LEVEL(&LOG, 2)) {
       ctime = PIL_check_seconds_timer();
 
       fetd = (ctime - ptime) * (endframe - CFRA) / baker->quick_step;
diff --git a/source/blender/editors/undo/ed_undo.c 
b/source/blender/editors/undo/ed_undo.c
index 1d54efb447c..01c93bc2fc4 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -119,7 +119,7 @@ void ED_undo_push(bContext *C, const char *str)
     BKE_undosys_stack_limit_steps_and_memory(wm->undo_stack, -1, memory_limit);
   }
 
-  if (CLOG_CHECK_VERBOSITY(&LOG, 1)) {
+  if (CLOG_CHECK_LEVEL(&LOG, 1)) {
     BKE_undosys_print(wm->undo_stack);
   }
 }
@@ -259,7 +259,7 @@ static int ed_undo_step_impl(
   Main *bmain = CTX_data_main(C);
   WM_toolsystem_refresh_screen_all(bmain);
 
-  if (CLOG_CHECK_VERBOSITY(&LOG, 1)) {
+  if (CLOG_CHECK_LEVEL(&LOG, 1)) {
     BKE_undosys_print(wm->undo_stack);
   }
 
diff --git a/source/blender/windowmanager/intern/wm_window.c 
b/source/blender/windowmanager/intern/wm_window.c
index 335691dd428..ae06fef4427 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1382,7 +1382,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, 
GHOST_TUserDataPtr C_void_ptr
             const bScreen *screen = WM_window_get_active_screen(win);
 
             /* debug prints */
-            if (CLOG_CHECK_VERBOSITY(WM_LOG_EVENTS, 1)) {
+            if (CLOG_CHECK_LEVEL(WM_LOG_EVENTS, 1)) {
               const char *state_str;
               state = GHOST_GetWindowState(win->ghostwin);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to