lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 21cca1e 4/4: Generally avoid camelCase


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 21cca1e 4/4: Generally avoid camelCase
Date: Sat, 16 Jun 2018 17:43:36 -0400 (EDT)

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

    Generally avoid camelCase
    
    Prefer snake_case or TitleCase; don't use camelCase without good reason.
---
 census_view.cpp             | 12 ++++++------
 database_view_editor.hpp    |  2 +-
 input_sequence_entry.cpp    | 22 +++++++++++-----------
 ledger_pdf_generator_wx.cpp |  2 +-
 main_wx_test.cpp            | 12 ++++++------
 wx_test_statusbar.hpp       |  6 +++---
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/census_view.cpp b/census_view.cpp
index 83179e6..0021a3b 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -131,7 +131,7 @@ class RangeTypeRenderer
     bool HasEditorCtrl() const override { return true; }
     wxWindow* CreateEditorCtrl
         (wxWindow*        parent
-        ,wxRect           labelRect
+        ,wxRect           label_rect
         ,wxVariant const& value
         ) override;
     bool GetValueFromEditorCtrl(wxWindow* editor, wxVariant& value) override;
@@ -164,7 +164,7 @@ RangeTypeRenderer::RangeTypeRenderer()
 
 wxWindow* RangeTypeRenderer::CreateEditorCtrl
     (wxWindow*        parent
-    ,wxRect           labelRect
+    ,wxRect           label_rect
     ,wxVariant const& value
     )
 {
@@ -172,7 +172,7 @@ wxWindow* RangeTypeRenderer::CreateEditorCtrl
     LMI_ASSERT(data);
 
     // Always use default height for editor controls
-    wxRect rect(labelRect);
+    wxRect rect(label_rect);
     rect.height = -1;
 
     return DoCreateEditor(parent, rect, *data);
@@ -418,7 +418,7 @@ class DatumSequenceRenderer
     bool HasEditorCtrl() const override { return true; }
     wxWindow* CreateEditorCtrl
         (wxWindow*        parent
-        ,wxRect           labelRect
+        ,wxRect           label_rect
         ,wxVariant const& value
         ) override;
     bool GetValueFromEditorCtrl(wxWindow* editor, wxVariant& value) override;
@@ -444,7 +444,7 @@ DatumSequenceRenderer::DatumSequenceRenderer()
 
 wxWindow* DatumSequenceRenderer::CreateEditorCtrl
     (wxWindow*        parent
-    ,wxRect           labelRect
+    ,wxRect           label_rect
     ,wxVariant const& value
     )
 {
@@ -458,7 +458,7 @@ wxWindow* DatumSequenceRenderer::CreateEditorCtrl
     ctrl->input(*data->input);
     ctrl->field_name(data->field);
 
-    ctrl->SetSize(labelRect);
+    ctrl->SetSize(label_rect);
 
     return ctrl;
 }
diff --git a/database_view_editor.hpp b/database_view_editor.hpp
index 3fd7e45..f35b89a 100644
--- a/database_view_editor.hpp
+++ b/database_view_editor.hpp
@@ -103,7 +103,7 @@ class DatabaseTableAdapter
     static void ConvertValue(Coords const&, std::vector<int>&);
 
     bool IsVoid() const;
-    bool ConfirmOperation(int itemCount) const;
+    bool ConfirmOperation(int item_count) const;
     void ReshapeTableData
         (std::vector<int>& axis_lengths
         ,bool user_confirm = false
diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index bc2943b..062dcfc 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -374,11 +374,11 @@ InputSequenceEditor::InputSequenceEditor(wxWindow* 
parent, wxString const& title
     rows_area_ = new(wx) wxScrolledWindow(this);
     top->Add(rows_area_, wxSizerFlags(1).Expand().DoubleBorder());
 
-    wxSize const sizerGap
+    wxSize const SizerGap
         (wxSizerFlags::GetDefaultBorder()
         ,wxSizerFlags::GetDefaultBorder()
         );
-    sizer_ = new(wx) wxFlexGridSizer(Col_Max, sizerGap);
+    sizer_ = new(wx) wxFlexGridSizer(Col_Max, SizerGap);
     rows_area_->SetSizer(sizer_);
 
     diagnostics_ = new(wx) wxStaticText
@@ -407,7 +407,7 @@ InputSequenceEditor::InputSequenceEditor(wxWindow* parent, 
wxString const& title
     // (as we assume they all have the same size) vertically.
     wxArrayInt const& row_heights = sizer_->GetRowHeights();
     LMI_ASSERT(!row_heights.empty());
-    rows_area_->SetScrollRate(0, row_heights[0] + sizerGap.y);
+    rows_area_->SetScrollRate(0, row_heights[0] + SizerGap.y);
 
     value_field_ctrl(0).SetFocus();
 }
@@ -663,8 +663,8 @@ void InputSequenceEditor::insert_row(int new_row)
         ,wxBU_AUTODRAW | wxBU_EXACTFIT | wxBORDER_NONE
         );
 #if defined __WXGTK__
-    wxBitmap removeBmp = wxArtProvider::GetBitmap("gtk-remove", wxART_BUTTON);
-    remove->SetBitmap(removeBmp);
+    wxBitmap RemoveBmp = wxArtProvider::GetBitmap("gtk-remove", wxART_BUTTON);
+    remove->SetBitmap(RemoveBmp);
 #endif // defined __WXGTK__
 
     remove->SetToolTip("Remove this row");
@@ -685,8 +685,8 @@ void InputSequenceEditor::insert_row(int new_row)
         ,wxBU_AUTODRAW | wxBU_EXACTFIT | wxBORDER_NONE
         );
 #if defined __WXGTK__
-    wxBitmap addBmp = wxArtProvider::GetBitmap("gtk-add", wxART_BUTTON);
-    add->SetBitmap(addBmp);
+    wxBitmap AddBmp = wxArtProvider::GetBitmap("gtk-add", wxART_BUTTON);
+    add->SetBitmap(AddBmp);
 #endif // defined __WXGTK__
 
     add->SetToolTip("Insert a new row after this one");
@@ -912,8 +912,8 @@ void InputSequenceEditor::really_do_layout()
     // sizer code correctly considers that if there is not enough space for
     // everything, it's better to reduce the size of the variable size items
     // rather than of the fixed size ones.
-    wxSize minRowsSize = sizer_->GetMinSize();
-    rows_area_->SetMinSize(minRowsSize);
+    wxSize MinRowsSize = sizer_->GetMinSize();
+    rows_area_->SetMinSize(MinRowsSize);
 
     // Now check if we're actually going to have a scrollbar or not by
     // comparing our ideal minimum size with the size we would actually have.
@@ -926,11 +926,11 @@ void InputSequenceEditor::really_do_layout()
         // allocating enough space for the scrollbar itself and also an extra
         // border between the controls and this scrollbar as things would look
         // too cramped otherwise.
-        minRowsSize.x
+        MinRowsSize.x
             += wxSizerFlags::GetDefaultBorder()
             +  wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y)
             ;
-        rows_area_->SetMinSize(minRowsSize);
+        rows_area_->SetMinSize(MinRowsSize);
         }
 
     sizer->Layout();
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index dd1802b..50ab650 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -596,7 +596,7 @@ TAG_HANDLER_BEGIN(scaled_image, "SCALED_IMAGE")
         // Disable error logging, we'll simply ignore the tag if the image is
         // not present.
             {
-            wxLogNull noLog;
+            wxLogNull NoLog;
             image.LoadFile(src);
             }
 
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index a463c69..191c937 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -770,8 +770,8 @@ void SkeletonTest::OnAssertFailure
 
 void SkeletonTest::RunTheTests()
 {
-    wxWindow* const mainWin = GetTopWindow();
-    if(!mainWin)
+    wxWindow* const MainWin = GetTopWindow();
+    if(!MainWin)
         {
         wxLogError("Failed to find the application main window.");
         ExitMainLoop();
@@ -808,8 +808,8 @@ void SkeletonTest::RunTheTests()
     // special command line option is specified).
     for(;;)
         {
-        wxWindow* const activeWin = wxGetActiveWindow();
-        if(!activeWin || activeWin == mainWin)
+        wxWindow* const ActiveWin = wxGetActiveWindow();
+        if(!ActiveWin || ActiveWin == MainWin)
             break;
 
         // Try to close the dialog.
@@ -818,7 +818,7 @@ void SkeletonTest::RunTheTests()
         wxYield();
 
         // But stop trying if it didn't work.
-        if(wxGetActiveWindow() == activeWin)
+        if(wxGetActiveWindow() == ActiveWin)
             {
             wxLogError("Failed to close the currently opened window, "
                        "please ensure it doesn't appear on program startup.");
@@ -833,7 +833,7 @@ void SkeletonTest::RunTheTests()
     // happen, this is important for the test to really run unattended.
     wxTestingModalHook expect_no_dialogs;
 
-    mainWin->SetFocus();
+    MainWin->SetFocus();
 
     wxPuts("NOTE: starting the test suite");
     wxStopWatch sw;
diff --git a/wx_test_statusbar.hpp b/wx_test_statusbar.hpp
index 04706eb..6f85295 100644
--- a/wx_test_statusbar.hpp
+++ b/wx_test_statusbar.hpp
@@ -35,10 +35,10 @@
 
 inline wxStatusBar& get_main_window_statusbar()
 {
-    wxWindow* const mainWin = wxTheApp->GetTopWindow();
-    LMI_ASSERT(mainWin);
+    wxWindow* const MainWin = wxTheApp->GetTopWindow();
+    LMI_ASSERT(MainWin);
 
-    wxFrame* const frame = wxDynamicCast(mainWin, wxFrame);
+    wxFrame* const frame = wxDynamicCast(MainWin, wxFrame);
     LMI_ASSERT(frame);
 
     wxStatusBar* const status = frame->GetStatusBar();



reply via email to

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