diff --git a/src/gui/ctrl/elem-access-dir.hpp b/src/gui/ctrl/elem-access-dir.hpp index c39028d65..32b1baa42 100644 --- a/src/gui/ctrl/elem-access-dir.hpp +++ b/src/gui/ctrl/elem-access-dir.hpp @@ -67,7 +67,6 @@ namespace ctrl{ */ class ElemAccessDir : public model::ElementAccess - , ::util::NonCopyable { WindowLocator& windowLoc_; PanelLocator& panelLoc_; @@ -84,7 +83,7 @@ namespace ctrl{ /* == ElementAccess interface == */ RawResult - performAccessTo (UICoord, size_t limitCreation) override + performAccessTo (UICoord const&, size_t limitCreation) override { UNIMPLEMENTED ("implementation of access function based on real UI widgets"); } diff --git a/src/gui/model/element-access.hpp b/src/gui/model/element-access.hpp index 684fdd55c..174f3fb5d 100644 --- a/src/gui/model/element-access.hpp +++ b/src/gui/model/element-access.hpp @@ -102,17 +102,17 @@ namespace model { /* == Access by Location == */ template - Result access (UICoord destination); + Result access (UICoord const& destination); template - Result access_or_create (UICoord destination, size_t limitCreation = LUMIERA_MAX_ORDINAL_NUMBER); + Result access_or_create (UICoord const& destination, size_t limitCreation = LUMIERA_MAX_ORDINAL_NUMBER); protected: using RawResult = lib::Variant>; /** @internal drill down according to coordinates, maybe create element */ - virtual RawResult performAccessTo (UICoord, size_t limitCreation) =0; + virtual RawResult performAccessTo (UICoord const&, size_t limitCreation) =0; private: template @@ -149,13 +149,13 @@ namespace model { // we know then the following dynamic_cast (downcast) can succeed using Base = typename RawResult::FirstMatching::Type; - void - accept (Base* pb) + virtual void + handle (Base& pb) override { if (pb) result = *dynamic_cast (pb); else - result = "access returns empty answer"; + result = Result{"access returns empty answer"}; } }; @@ -174,7 +174,7 @@ namespace model { */ template inline ElementAccess::Result - ElementAccess::access (UICoord destination) + ElementAccess::access (UICoord const& destination) { return access_or_create (destination, 0); } @@ -189,7 +189,7 @@ namespace model { */ template inline ElementAccess::Result - ElementAccess::access_or_create (UICoord destination, size_t limitCreation) + ElementAccess::access_or_create (UICoord const& destination, size_t limitCreation) { TypeConverter converter; RawResult targetElm = performAccessTo (destination, limitCreation); diff --git a/tests/gui/test/test-element-access.hpp b/tests/gui/test/test-element-access.hpp index 3709ad709..f575f5aa6 100644 --- a/tests/gui/test/test-element-access.hpp +++ b/tests/gui/test/test-element-access.hpp @@ -100,7 +100,7 @@ namespace test { /* == ElementAccess interface == */ RawResult - performAccessTo (UICoord target, size_t limitCreation) override + performAccessTo (UICoord const& target, size_t limitCreation) override { CHECK (target == expectedQuery); return expectedAnswer; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index c3cb059bf..8b47c68e3 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -12939,8 +12939,8 @@ - - + + @@ -12954,11 +12954,16 @@ + + + + + - - + +