← Back to team overview

kicad-developers team mailing list archive

[PATCH 3/4] Make trace strings even more const

 

There is no need to reassign these.
---
 common/trace_helpers.cpp | 20 ++++++++++----------
 include/trace_helpers.h  | 20 ++++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/common/trace_helpers.cpp b/common/trace_helpers.cpp
index bf5244cf9..5379980fc 100644
--- a/common/trace_helpers.cpp
+++ b/common/trace_helpers.cpp
@@ -35,16 +35,16 @@
 #include <trace_helpers.h>
 
 
-const wxChar* traceFindReplace = wxT( "KICAD_FIND_REPLACE" );
-const wxChar* kicadTraceCoords = wxT( "KICAD_COORDS" );
-const wxChar* kicadTraceKeyEvent = wxT( "KICAD_KEY_EVENTS" );
-const wxChar* traceSchLibMem = wxT( "KICAD_SCH_LIB_MEM" );
-const wxChar* traceFindItem = wxT( "KICAD_FIND_ITEM" );
-const wxChar* traceSchLegacyPlugin = wxT( "KICAD_SCH_LEGACY_PLUGIN" );
-const wxChar* traceGedaPcbPlugin = wxT( "KICAD_GEDA_PLUGIN" );
-const wxChar* traceKicadPcbPlugin = wxT( "KICAD_PCB_PLUGIN" );
-const wxChar* tracePrinting = wxT( "KICAD_PRINT" );
-const wxChar* traceAutoSave = wxT( "KICAD_AUTOSAVE" );
+const wxChar* const traceFindReplace = wxT( "KICAD_FIND_REPLACE" );
+const wxChar* const kicadTraceCoords = wxT( "KICAD_COORDS" );
+const wxChar* const kicadTraceKeyEvent = wxT( "KICAD_KEY_EVENTS" );
+const wxChar* const traceSchLibMem = wxT( "KICAD_SCH_LIB_MEM" );
+const wxChar* const traceFindItem = wxT( "KICAD_FIND_ITEM" );
+const wxChar* const traceSchLegacyPlugin = wxT( "KICAD_SCH_LEGACY_PLUGIN" );
+const wxChar* const traceGedaPcbPlugin = wxT( "KICAD_GEDA_PLUGIN" );
+const wxChar* const traceKicadPcbPlugin = wxT( "KICAD_PCB_PLUGIN" );
+const wxChar* const tracePrinting = wxT( "KICAD_PRINT" );
+const wxChar* const traceAutoSave = wxT( "KICAD_AUTOSAVE" );
 
 
 wxString dump( const wxArrayString& aArray )
diff --git a/include/trace_helpers.h b/include/trace_helpers.h
index 3c692de55..a309cb68c 100644
--- a/include/trace_helpers.h
+++ b/include/trace_helpers.h
@@ -46,53 +46,53 @@
 /**
  * Flag to enable find debug tracing.
  */
-extern const wxChar* traceFindItem;
+extern const wxChar* const traceFindItem;
 
 /**
  * Flag to enable find and replace debug tracing.
  */
-extern const wxChar* traceFindReplace;
+extern const wxChar* const traceFindReplace;
 
 /**
  * Flag to enable draw panel coordinate debug tracing.
  */
-extern const wxChar* kicadTraceCoords;
+extern const wxChar* const kicadTraceCoords;
 
 
 /**
  * Flag to enable wxKeyEvent debug tracing.
  */
-extern const wxChar* kicadTraceKeyEvent;
+extern const wxChar* const kicadTraceKeyEvent;
 
 /**
  * Flag to enable auto save feature debug tracing.
  */
-extern const wxChar* traceAutoSave;
+extern const wxChar* const traceAutoSave;
 
 /**
  * Flag to enable schematic library memory deletion debug output.
  */
-extern const wxChar* traceSchLibMem;
+extern const wxChar* const traceSchLibMem;
 
 /**
  * Flag to enable legacy schematic plugin debug output.
  */
-extern const wxChar* traceSchLegacyPlugin;
+extern const wxChar* const traceSchLegacyPlugin;
 
 /**
  * Flag to enable GEDA PCB plugin debug output.
  */
-extern const wxChar* traceKicadPcbPlugin;
+extern const wxChar* const traceKicadPcbPlugin;
 
 /**
  * Flag to enable GEDA PCB plugin debug output.
  */
-extern const wxChar* traceGedaPcbPlugin;
+extern const wxChar* const traceGedaPcbPlugin;
 
 /**
  * Flag to enable print controller debug output.
  */
-extern const wxChar* tracePrinting;
+extern const wxChar* const tracePrinting;
 
 ///@}
 

References