[gtkmm/wip/dboles/Builder-test-cleanups: 1/3] tests/builder: Fix icon_name to const& and shorten



commit a23ed915d2b58cc1c24f3e56d8acd0dd0d0d26ec
Author: Daniel Boles <dboles src gmail com>
Date:   Sun Nov 24 14:00:55 2019 +0000

    tests/builder: Fix icon_name to const& and shorten
    
    …the way of declaring that it should default to a default-init’d string.
    
    It didn’t make sense to pass a const value, so make it a const reference
    as per basically everywhere else that we take string parameters.

 tests/builder/main.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/builder/main.cc b/tests/builder/main.cc
index f296ccf2..093c2edc 100644
--- a/tests/builder/main.cc
+++ b/tests/builder/main.cc
@@ -88,7 +88,7 @@ class DerivedButton : public Gtk::Button
 {
 public:
   DerivedButton(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* refBuilder */,
-    const Glib::ustring icon_name = Glib::ustring())
+                const Glib::ustring& icon_name = {})
   : Gtk::Button(cobject)
   {
     std::cout << "DerivedButton::ctor" << std::endl;


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