From c14bd74f268d4883a73f46a7ceac2d2e98ac96a3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 10 Oct 2012 00:06:09 +0100 Subject: don't do things differently on higher debug levels Change-Id: Ib1fd8c4a5ab4db8d5889ea489b74569639994714 --- vcl/inc/vcl/builder.hxx | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'vcl/inc/vcl') diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx index aae959a3fe31..83b1139b9eee 100644 --- a/vcl/inc/vcl/builder.hxx +++ b/vcl/inc/vcl/builder.hxx @@ -144,36 +144,17 @@ public: template T* get(T*& ret, OString sID) { Window *w = get_by_name(sID); - assert(w); + assert(w && dynamic_cast(w)); ret = static_cast(w); - -#if OSL_DEBUG_LEVEL > 0 - if (w) - { - ret = dynamic_cast(w); - assert(ret); - } -#endif - return ret; } //sID may not exist, but must be of type T if it does template T* get(OString sID) { Window *w = get_by_name(sID); - T* ret = static_cast(w); - -#if OSL_DEBUG_LEVEL > 0 - if (w) - { - ret = dynamic_cast(w); - assert(ret); - } -#endif - - return ret; + assert(!w || dynamic_cast(w)); + return static_cast(w); } - OString get_by_window(const Window *pWindow) const; //for the purposes of retrofitting this to the existing code //look up sID, clone its properties into replacement and -- cgit v1.2.3