lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e7b741f 10/13: Write 'const' after the type i


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e7b741f 10/13: Write 'const' after the type it modifies
Date: Sat, 12 May 2018 12:00:23 -0400 (EDT)

branch: master
commit e7b741fe9c64ea42af6e8d6feb27660fe5e16397
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Write 'const' after the type it modifies
---
 input_sequence_entry.cpp    | 2 +-
 ledger_pdf_generator_wx.cpp | 2 +-
 main_wx_test.cpp            | 2 +-
 md5.cpp                     | 4 ++--
 multidimgrid_any.cpp        | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 0ebb267..e1a7427 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -374,7 +374,7 @@ InputSequenceEditor::InputSequenceEditor(wxWindow* parent, 
wxString const& title
     rows_area_ = new(wx) wxScrolledWindow(this);
     top->Add(rows_area_, wxSizerFlags(1).Expand().DoubleBorder());
 
-    const wxSize sizerGap
+    wxSize const sizerGap
         (wxSizerFlags::GetDefaultBorder()
         ,wxSizerFlags::GetDefaultBorder()
         );
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index dd7fd63..2dcfbb4 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -68,7 +68,7 @@ namespace
 {
 
 // Color used for rules and borders in illustrations.
-const wxColor rule_color(0x00, 0x2f, 0x6c);
+wxColor const rule_color(0x00, 0x2f, 0x6c);
 
 // This function is also provided in <boost/algorithm/string/predicate.hpp>,
 // but it's arguably not worth adding dependency on this Boost library just for
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index 5fa6d22..ef657d8 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -527,7 +527,7 @@ wx_base_test_case::wx_base_test_case(char const* name)
 
 void wx_base_test_case::skip_if_not_supported(char const* file)
 {
-    const wxString p(file);
+    wxString const p(file);
     if(!wxDocManager::GetDocumentManager()->FindTemplateForPath(p))
         {
         throw test_skipped_exception
diff --git a/md5.cpp b/md5.cpp
index b424d42..5a7f6a0 100644
--- a/md5.cpp
+++ b/md5.cpp
@@ -339,9 +339,9 @@ md5_process_block (void const* buffer, std::size_t len, 
struct md5_ctx* ctx)
 /* GWC: Conform to C++98.
  * const md5_uint32 *words = buffer;
  */
-  const md5_uint32 *words = (const md5_uint32*)buffer;
+  md5_uint32 const* words = (const md5_uint32*)buffer;
   std::size_t nwords = len / sizeof (md5_uint32);
-  const md5_uint32 *endp = words + nwords;
+  md5_uint32 const* endp = words + nwords;
   md5_uint32 A = ctx->A;
   md5_uint32 B = ctx->B;
   md5_uint32 C = ctx->C;
diff --git a/multidimgrid_any.cpp b/multidimgrid_any.cpp
index 50da143..c3380ea 100644
--- a/multidimgrid_any.cpp
+++ b/multidimgrid_any.cpp
@@ -474,7 +474,7 @@ void MultiDimGrid::DoRefreshTableData()
     // data fit in it. At the same time, we want to keep some sensible
     // minimal width so that columns with short labels (e.g. states, age)
     // aren't too narrow.
-    const int cols = GetNumberCols();
+    int const cols = GetNumberCols();
     for(int i = 0; i < cols; ++i)
         {
             // set some minimal width for aesthetic reasons (otherwise
@@ -546,7 +546,7 @@ std::pair<int,int> MultiDimGrid::SuggestGridAxisSelection() 
const
     int newFirst = first_grid_axis_;
     int newSecond = second_grid_axis_;
 
-    const bool canReorder = newFirst == wxNOT_FOUND || newSecond == 
wxNOT_FOUND;
+    bool const canReorder = newFirst == wxNOT_FOUND || newSecond == 
wxNOT_FOUND;
 
     for(unsigned int i = 0; i < dimension_; ++i)
         {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]