diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-10 11:41:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-10 11:41:08 +0200 |
commit | dd90d9b6d7149c68f931805beaa7dbeee8074d3f (patch) | |
tree | b3d232d286fb77b513422bd78163990d5c133390 /framework/source/helper/ocomponentenumeration.cxx | |
parent | ed9d32908dca5740109f0d9f3233721aa3a49775 (diff) |
-Werror,-Wtautological-undefined-compare
Change-Id: Ibd738b91d35a1b82e1e7b078ef73c6f6076dc08a
Diffstat (limited to 'framework/source/helper/ocomponentenumeration.cxx')
-rw-r--r-- | framework/source/helper/ocomponentenumeration.cxx | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx index 6aa602d219e0..bfcdd43d992f 100644 --- a/framework/source/helper/ocomponentenumeration.cxx +++ b/framework/source/helper/ocomponentenumeration.cxx @@ -35,11 +35,7 @@ using namespace ::rtl; OComponentEnumeration::OComponentEnumeration( const Sequence< css::uno::Reference< XComponent > >& seqComponents ) : m_nPosition ( 0 ) // 0 is the first position for a valid list and the right value for an invalid list to! , m_seqComponents ( seqComponents ) -{ - // Safe impossible states - // "Method" not defined for ALL parameters! - SAL_WARN_IF( !impldbg_checkParameter_OComponentEnumerationCtor( seqComponents ), "fwk", "OComponentEnumeration::OComponentEnumeration(): Invalid parameter detected!" ); -} +{} // destructor @@ -57,7 +53,7 @@ void SAL_CALL OComponentEnumeration::disposing( const EventObject& aEvent ) thro // Safe impossible cases // This method is not specified for all incoming parameters. (void) aEvent; - SAL_WARN_IF( !impldbg_checkParameter_disposing( aEvent ), "fwk", "OComponentEnumeration::disposing(): Invalid parameter detected!" ); + SAL_WARN_IF( !aEvent.Source.is(), "fwk", "OComponentEnumeration::disposing(): Invalid parameter detected!" ); // Reset instance to defaults, release references and free memory. impl_resetObject(); @@ -119,39 +115,6 @@ void OComponentEnumeration::impl_resetObject() m_nPosition = 0; } -// debug methods - -/*----------------------------------------------------------------------------------------------------------------- - The follow methods checks the parameter for other functions. If a parameter or his value is non valid, - we return "sal_False". (else sal_True) This mechanism is used to throw an ASSERT! - - ATTENTION - - If you miss a test for one of this parameters, contact the author or add it himself !(?) - But ... look for right testing! See using of this methods! ------------------------------------------------------------------------------------------------------------------*/ - -// An empty list is allowed ... hasMoreElements() will return false then! -bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor( const Sequence< css::uno::Reference< XComponent > >& seqComponents ) -{ - // Set default return value. - bool bOK = true; - // Check parameter. - if ( - ( &seqComponents == NULL ) - ) - { - bOK = false; - } - // Return result of check. - return bOK; -} - -bool OComponentEnumeration::impldbg_checkParameter_disposing( const EventObject& aEvent ) -{ - return aEvent.Source.is(); -} - } // namespace framework /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |