From 1340890ccdff010c827a8e98eb2eaf1a2ec49a2d Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Sat, 14 Jul 2012 05:37:24 +0200 Subject: simplify include guards Change-Id: Id4210229b20a1d54b680ff1a2ccbcdd3684ecf5f --- comphelper/inc/comphelper/anytostring.hxx | 2 +- comphelper/inc/comphelper/implbase_var.hxx | 12 +++--------- comphelper/inc/comphelper/make_shared_from_uno.hxx | 2 +- comphelper/inc/comphelper/makesequence.hxx | 4 ++-- comphelper/inc/comphelper/optional.hxx | 4 +--- comphelper/inc/comphelper/scopeguard.hxx | 4 +--- comphelper/inc/comphelper/servicedecl.hxx | 4 ++-- comphelper/inc/comphelper/unwrapargs.hxx | 8 ++------ 8 files changed, 13 insertions(+), 27 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/anytostring.hxx b/comphelper/inc/comphelper/anytostring.hxx index 0fdedadfec05..ff34c02f18f3 100644 --- a/comphelper/inc/comphelper/anytostring.hxx +++ b/comphelper/inc/comphelper/anytostring.hxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(INCLUDED_COMPHELPER_ANYTOSTRING_HXX) +#ifndef INCLUDED_COMPHELPER_ANYTOSTRING_HXX #define INCLUDED_COMPHELPER_ANYTOSTRING_HXX #include "rtl/ustring.hxx" diff --git a/comphelper/inc/comphelper/implbase_var.hxx b/comphelper/inc/comphelper/implbase_var.hxx index 97e330b517cf..fee9eb695c08 100644 --- a/comphelper/inc/comphelper/implbase_var.hxx +++ b/comphelper/inc/comphelper/implbase_var.hxx @@ -38,7 +38,7 @@ include guards. Please use the following external include guard rule where is the number of interface types: - #if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_) + #ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_ #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_ #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER #include "comphelper/implbase_var.hxx" @@ -53,7 +53,7 @@ The default is a maximum of 6 arguments. */ -#if ! defined(COMPHELPER_IMPLBASE_INTERFACE_NUMBER) +#ifndef COMPHELPER_IMPLBASE_INTERFACE_NUMBER #error "you have to define COMPHELPER_IMPLBASE_INTERFACE_NUMBER prior to including comphelper/implbase_var.hxx!" #endif // ! defined(COMPHELPER_IMPLBASE_INTERFACE_NUMBER) @@ -61,19 +61,13 @@ #error "include proper header file: cppuhelper/implbase.hxx or cppuhelper/compbase.hxx!" #endif -#if ! defined(COMPHELPER_IMPLBASE_MAX_CTOR_ARGS) +#ifndef COMPHELPER_IMPLBASE_MAX_CTOR_ARGS #define COMPHELPER_IMPLBASE_MAX_CTOR_ARGS 6 // default #endif -#if ! defined(_CPPUHELPER_IMPLBASE_EX_HXX_) #include "cppuhelper/implbase_ex.hxx" -#endif -#if ! defined(INCLUDED_RTL_INSTANCE_HXX) #include "rtl/instance.hxx" -#endif -#if ! defined(_CPPUHELPER_COMPBASE_EX_HXX_) #include "cppuhelper/compbase_ex.hxx" -#endif #include "boost/preprocessor/cat.hpp" #include "boost/preprocessor/repetition.hpp" diff --git a/comphelper/inc/comphelper/make_shared_from_uno.hxx b/comphelper/inc/comphelper/make_shared_from_uno.hxx index 290665fa4151..2a70094a3f94 100644 --- a/comphelper/inc/comphelper/make_shared_from_uno.hxx +++ b/comphelper/inc/comphelper/make_shared_from_uno.hxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX) +#ifndef INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX #define INCLUDED_COMPHELPER_MAKE_SHARED_FROM_UNO_HXX #include "boost/shared_ptr.hpp" diff --git a/comphelper/inc/comphelper/makesequence.hxx b/comphelper/inc/comphelper/makesequence.hxx index 36a1acf22326..bc35657db9a8 100644 --- a/comphelper/inc/comphelper/makesequence.hxx +++ b/comphelper/inc/comphelper/makesequence.hxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(COMPHELPER_MAKESEQUENCE_HXX_INCLUDED) +#ifndef COMPHELPER_MAKESEQUENCE_HXX_INCLUDED #define COMPHELPER_MAKESEQUENCE_HXX_INCLUDED #include "com/sun/star/uno/Sequence.hxx" @@ -62,7 +62,7 @@ inline ::com::sun::star::uno::Sequence makeSequence( \ return seq; \ } -#if ! defined(COMPHELPER_MAKESEQUENCE_MAX_ARGS) +#ifndef COMPHELPER_MAKESEQUENCE_MAX_ARGS #define COMPHELPER_MAKESEQUENCE_MAX_ARGS 12 #endif diff --git a/comphelper/inc/comphelper/optional.hxx b/comphelper/inc/comphelper/optional.hxx index 197826d522f5..031a30328340 100644 --- a/comphelper/inc/comphelper/optional.hxx +++ b/comphelper/inc/comphelper/optional.hxx @@ -16,12 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(INCLUDED_COMPHELPER_OPTIONAL_HXX) +#ifndef INCLUDED_COMPHELPER_OPTIONAL_HXX #define INCLUDED_COMPHELPER_OPTIONAL_HXX -#if ! defined(_COM_SUN_STAR_BEANS_OPTIONAL_HPP_) #include "com/sun/star/beans/Optional.hpp" -#endif #include "boost/optional.hpp" namespace comphelper { diff --git a/comphelper/inc/comphelper/scopeguard.hxx b/comphelper/inc/comphelper/scopeguard.hxx index dd77700f4580..5bc2aafaa781 100644 --- a/comphelper/inc/comphelper/scopeguard.hxx +++ b/comphelper/inc/comphelper/scopeguard.hxx @@ -17,12 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(INCLUDED_COMPHELPER_SCOPEGUARD_HXX) +#ifndef INCLUDED_COMPHELPER_SCOPEGUARD_HXX #define INCLUDED_COMPHELPER_SCOPEGUARD_HXX -#if ! defined(INCLUDED_COMPHELPERDLLAPI_H) #include "comphelper/comphelperdllapi.h" -#endif #include "boost/function.hpp" #include "boost/noncopyable.hpp" #include "boost/bind.hpp" diff --git a/comphelper/inc/comphelper/servicedecl.hxx b/comphelper/inc/comphelper/servicedecl.hxx index ff2aaae8d9a4..442bf9f592f7 100644 --- a/comphelper/inc/comphelper/servicedecl.hxx +++ b/comphelper/inc/comphelper/servicedecl.hxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(COMPHELPER_SERVICEDECL_HXX_INCLUDED) +#ifndef COMPHELPER_SERVICEDECL_HXX_INCLUDED #define COMPHELPER_SERVICEDECL_HXX_INCLUDED #include @@ -335,7 +335,7 @@ inline void * component_getFactoryHelper( \ return pRet; \ } -#if ! defined(COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS) +#ifndef COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS #define COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS 8 #endif diff --git a/comphelper/inc/comphelper/unwrapargs.hxx b/comphelper/inc/comphelper/unwrapargs.hxx index 30db738712ac..bdd8d769de4a 100644 --- a/comphelper/inc/comphelper/unwrapargs.hxx +++ b/comphelper/inc/comphelper/unwrapargs.hxx @@ -17,16 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ! defined(COMPHELPER_UNWRAPARGS_HXX_INCLUDED) +#ifndef COMPHELPER_UNWRAPARGS_HXX_INCLUDED #define COMPHELPER_UNWRAPARGS_HXX_INCLUDED -#if ! defined(_RTL_USTRBUF_HXX_) #include "rtl/ustrbuf.hxx" -#endif #include "com/sun/star/uno/Sequence.hxx" -#if ! defined(_COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_) #include "com/sun/star/lang/IllegalArgumentException.hpp" -#endif #include "boost/optional.hpp" #include "boost/preprocessor/cat.hpp" #include "boost/preprocessor/repetition.hpp" @@ -125,7 +121,7 @@ inline void unwrapArgs( \ BOOST_PP_REPEAT(BOOST_PP_ADD(n_, 1), COMPHELPER_UNWRAPARGS_extract, ~) \ } -#if ! defined(COMPHELPER_UNWRAPARGS_MAX_ARGS) +#ifndef COMPHELPER_UNWRAPARGS_MAX_ARGS #define COMPHELPER_UNWRAPARGS_MAX_ARGS 12 #endif -- cgit