diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:26:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:54 +0100 |
commit | 1c4f33b5d8ba6a8cebb0235bb2e7e37e33045a5b (patch) | |
tree | 80530f50cf36927a1e4f31ad0192077bfb0ecf39 /include/tools | |
parent | 175e2adfd1677cb83373b0ba47853493f3b77859 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: Ia5acfb564f913d52cd25b5d64d06b5280b94cb72
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/debug.hxx | 2 | ||||
-rw-r--r-- | include/tools/errinf.hxx | 2 | ||||
-rw-r--r-- | include/tools/inetmime.hxx | 4 | ||||
-rw-r--r-- | include/tools/inetmsg.hxx | 2 | ||||
-rw-r--r-- | include/tools/multisel.hxx | 12 | ||||
-rw-r--r-- | include/tools/poly.hxx | 2 | ||||
-rw-r--r-- | include/tools/rc.hxx | 2 | ||||
-rw-r--r-- | include/tools/resid.hxx | 6 | ||||
-rw-r--r-- | include/tools/resmgr.hxx | 8 | ||||
-rw-r--r-- | include/tools/rtti.hxx | 8 | ||||
-rw-r--r-- | include/tools/simplerm.hxx | 2 | ||||
-rw-r--r-- | include/tools/solar.h | 2 | ||||
-rw-r--r-- | include/tools/stream.hxx | 4 | ||||
-rw-r--r-- | include/tools/urlobj.hxx | 2 |
14 files changed, 29 insertions, 29 deletions
diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx index d2748e0025b1..4ad90223e52f 100644 --- a/include/tools/debug.hxx +++ b/include/tools/debug.hxx @@ -43,7 +43,7 @@ typedef void (*DbgTestSolarMutexProc)(); #define DBG_FUNC_SETTESTSOLARMUTEX 2 #define DBG_FUNC_TESTSOLARMUTEX 3 -TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL ); +TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = nullptr ); inline void DbgSetTestSolarMutex( DbgTestSolarMutexProc pProc ) { diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx index 04db67ad5b2d..ea188e43b210 100644 --- a/include/tools/errinf.hxx +++ b/include/tools/errinf.hxx @@ -126,7 +126,7 @@ private: ErrorContextImpl *pImpl; public: - ErrorContext(vcl::Window *pWin=0); + ErrorContext(vcl::Window *pWin=nullptr); virtual ~ErrorContext(); virtual bool GetString( sal_uIntPtr nErrId, OUString& rCtxStr ) = 0; diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx index e1d44d16668e..73d9975054a8 100644 --- a/include/tools/inetmime.hxx +++ b/include/tools/inetmime.hxx @@ -197,8 +197,8 @@ public: */ static sal_Unicode const * scanContentType( sal_Unicode const *pBegin, sal_Unicode const * pEnd, - OUString * pType = 0, OUString * pSubType = 0, - INetContentTypeParameterList * pParameters = 0); + OUString * pType = nullptr, OUString * pSubType = nullptr, + INetContentTypeParameterList * pParameters = nullptr); static void writeHeaderFieldBody(INetMIMEOutputSink & rSink, const OUString& rBody, diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx index 2d83469d71d2..996e3348dad7 100644 --- a/include/tools/inetmsg.hxx +++ b/include/tools/inetmsg.hxx @@ -170,7 +170,7 @@ public: INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const { - return ( nIndex < aChildren.size() ) ? aChildren[ nIndex ] : NULL; + return ( nIndex < aChildren.size() ) ? aChildren[ nIndex ] : nullptr; } INetMIMEMessage* GetParent() const { return pParent; } diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 3a8c75287865..3b6dafc3643f 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -101,7 +101,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator bool setRange( const OUString& i_rNewRange, bool i_bStrict = false ); bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool bMayAdjust ); bool insertJoinedRanges( const std::vector< sal_Int32 >& rNumbers, bool i_bStrict ); - bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const; + bool checkValue( sal_Int32, const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; public: class TOOLS_DLLPUBLIC Iterator { @@ -119,7 +119,7 @@ public: , nRangeIndex( i_nRange ), nCurrent( i_nCurrent ) {} public: - Iterator() : pEnumerator( NULL ), pPossibleValues( NULL ), nRangeIndex( -1 ), nCurrent( -1 ) {} + Iterator() : pEnumerator( nullptr ), pPossibleValues( nullptr ), nRangeIndex( -1 ), nCurrent( -1 ) {} Iterator& operator++(); sal_Int32 operator*() const { return nCurrent;} bool operator==(const Iterator&) const; @@ -136,11 +136,11 @@ public: ); sal_Int32 size() const { return mnCount; } - Iterator begin( const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const; - Iterator end( const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const; + Iterator begin( const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; + Iterator end( const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; bool isValidInput() const { return mbValidInput; } - bool hasValue( sal_Int32 nValue, const std::set< sal_Int32 >* i_pPossibleValues = NULL ) const; + bool hasValue( sal_Int32 nValue, const std::set< sal_Int32 >* i_pPossibleValues = nullptr ) const; /** i_rPageRange: the string to be changed into a sequence of numbers @@ -171,7 +171,7 @@ public: sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset = -1, - std::set< sal_Int32 >* i_pPossibleValues = NULL + std::set< sal_Int32 >* i_pPossibleValues = nullptr ); }; diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index 0471a6840536..1d25800c6267 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -86,7 +86,7 @@ public: Polygon(); Polygon( sal_uInt16 nSize ); Polygon( sal_uInt16 nPoints, const Point* pPtAry, - const sal_uInt8* pFlagAry = NULL ); + const sal_uInt8* pFlagAry = nullptr ); Polygon( const Rectangle& rRect ); Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); diff --git a/include/tools/rc.hxx b/include/tools/rc.hxx index b26711dda949..6b1e1be99e2f 100644 --- a/include/tools/rc.hxx +++ b/include/tools/rc.hxx @@ -73,7 +73,7 @@ protected: { m_pResMgr->PopContext( this ); } // constructors - Resource() : m_pResMgr( NULL ) {} + Resource() : m_pResMgr( nullptr ) {} Resource( const ResId& rResId ); public: diff --git a/include/tools/resid.hxx b/include/tools/resid.hxx index eea1e64aabd2..dd0188d3fded 100644 --- a/include/tools/resid.hxx +++ b/include/tools/resid.hxx @@ -53,7 +53,7 @@ class ResId void ImplInit( sal_uInt32 nId, ResMgr& rMgr, RSHEADER_TYPE* pRes ) { m_pResource = pRes; m_nResId = nId; m_nRT = RSC_NOTYPE; m_pResMgr = &rMgr; m_nRT2 = RSC_NOTYPE; m_nWinBits = 0; - OSL_ENSURE( m_pResMgr != NULL, "ResId without ResMgr created" ); + OSL_ENSURE( m_pResMgr != nullptr, "ResId without ResMgr created" ); } public: @@ -63,7 +63,7 @@ public: } ResId( sal_uInt32 nId, ResMgr& rMgr ) { - ImplInit( nId, rMgr, NULL ); + ImplInit( nId, rMgr, nullptr ); } void SetWinBits( sal_uInt32 nBits ) const { m_nWinBits = nBits; } @@ -102,7 +102,7 @@ public: const ResId & SetResMgr( ResMgr * pMgr ) const { m_pResMgr = pMgr; - OSL_ENSURE( m_pResMgr != NULL, "invalid ResMgr set on ResId" ); + OSL_ENSURE( m_pResMgr != nullptr, "invalid ResMgr set on ResId" ); return *this; } diff --git a/include/tools/resmgr.hxx b/include/tools/resmgr.hxx index ade174674240..b6561ef3068c 100644 --- a/include/tools/resmgr.hxx +++ b/include/tools/resmgr.hxx @@ -96,7 +96,7 @@ private: TOOLS_DLLPRIVATE const ImpRCStack * StackTop( sal_uInt32 nOff = 0 ) const { - return (((int)nOff >= nCurStack) ? NULL : &aStack[nCurStack-nOff]); + return (((int)nOff >= nCurStack) ? nullptr : &aStack[nCurStack-nOff]); } TOOLS_DLLPRIVATE void Init( const OUString& rFileName ); @@ -148,13 +148,13 @@ public: /// Check whether resource is available bool IsAvailable( const ResId& rId, - const Resource* = NULL) const; + const Resource* = nullptr) const; /// Search and load resource, given its ID - bool GetResource( const ResId& rId, const Resource * = NULL ); + bool GetResource( const ResId& rId, const Resource * = nullptr ); static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr ); /// Free resource context - void PopContext( const Resource* = NULL ); + void PopContext( const Resource* = nullptr ); /// Increment resource pointer void* Increment( sal_uInt32 nSize ); diff --git a/include/tools/rtti.hxx b/include/tools/rtti.hxx index 57163611db6a..3c8968582241 100644 --- a/include/tools/rtti.hxx +++ b/include/tools/rtti.hxx @@ -71,7 +71,7 @@ typedef void* (*TypeId)(); TYPEINIT_FACTORY(sType, Factory); \ TYPEINIT_END(sType) #define TYPEINIT0_AUTOFACTORY(sType) TYPEINIT0_FACTORY(sType, new sType) -#define TYPEINIT0(sType) TYPEINIT0_FACTORY(sType, 0) +#define TYPEINIT0(sType) TYPEINIT0_FACTORY(sType, nullptr) #define TYPEINIT1_FACTORY(sType, sSuper, Factory) \ TYPEINIT_FACTORY(sType, Factory); \ @@ -80,7 +80,7 @@ typedef void* (*TypeId)(); #define TYPEINIT1_AUTOFACTORY(sType, sSuper) \ TYPEINIT1_FACTORY(sType, sSuper, new sType) #define TYPEINIT1(sType, sSuper) \ - TYPEINIT1_FACTORY(sType, sSuper, 0) + TYPEINIT1_FACTORY(sType, sSuper, nullptr) #define TYPEINIT2_FACTORY(sType, sSuper1, sSuper2, Factory) \ TYPEINIT_FACTORY(sType, Factory); \ @@ -90,7 +90,7 @@ typedef void* (*TypeId)(); #define TYPEINIT2_AUTOFACTORY(sType, sSuper1, sSuper2) \ TYPEINIT2_FACTORY(sType, sSuper1, sSuper2, new sType) #define TYPEINIT2(sType, sSuper1, sSuper2) \ - TYPEINIT2_FACTORY(sType, sSuper1, sSuper2, 0) + TYPEINIT2_FACTORY(sType, sSuper1, sSuper2, nullptr) #define TYPEINIT3_FACTORY(sType, sSuper1, sSuper2, sSuper3, Factory) \ TYPEINIT_FACTORY(sType, Factory); \ @@ -99,7 +99,7 @@ typedef void* (*TypeId)(); SUPERTYPE(sSuper3); \ TYPEINIT_END(sType) #define TYPEINIT3(sType, sSuper1, sSuper2, sSuper3) \ - TYPEINIT3_FACTORY(sType, sSuper1, sSuper2, sSuper3, 0) + TYPEINIT3_FACTORY(sType, sSuper1, sSuper2, sSuper3, nullptr) #define TYPE(sType) (sType::StaticType()) #define ISA(sType) IsA(sType::StaticType()) diff --git a/include/tools/simplerm.hxx b/include/tools/simplerm.hxx index 09fd73271168..87834a7fef2b 100644 --- a/include/tools/simplerm.hxx +++ b/include/tools/simplerm.hxx @@ -53,7 +53,7 @@ public: static SimpleResMgr* Create( const sal_Char* pPrefixName, const LanguageTag& rLocale = LanguageTag( LANGUAGE_SYSTEM) );// only in VCL - bool IsValid() const { return m_pResImpl != NULL; } + bool IsValid() const { return m_pResImpl != nullptr; } /** reads the string with the given resource id @param nId diff --git a/include/tools/solar.h b/include/tools/solar.h index 4e099c414fa3..e349024fd9d7 100644 --- a/include/tools/solar.h +++ b/include/tools/solar.h @@ -33,7 +33,7 @@ typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */ // misc. macros to leverage platform and compiler differences -#define DELETEZ( p ) ( delete p,p = 0 ) +#define DELETEZ( p ) ( delete p,p = NULL ) // solar binary types diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 9867a37fd318..8c68a211fe56 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -114,7 +114,7 @@ protected: public: TYPEINFO(); - SvLockBytes() : m_pStream(0), m_bOwner(false), m_bSync(false) {} + SvLockBytes() : m_pStream(nullptr), m_bOwner(false), m_bSync(false) {} SvLockBytes(SvStream * pTheStream, bool bTheOwner = false) : m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(false) {} @@ -147,7 +147,7 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes public: TYPEINFO_OVERRIDE(); - SvOpenLockBytes() : SvLockBytes(0, false) {} + SvOpenLockBytes() : SvLockBytes(nullptr, false) {} SvOpenLockBytes(SvStream * pStream, bool bOwner): SvLockBytes(pStream, bOwner) {} diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 7e1869ccced1..0d49bdf765f8 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -835,7 +835,7 @@ public: specified notation, or if this is not a file URL at all, an empty string is returned. */ - OUString getFSysPath(FSysStyle eStyle, sal_Unicode * pDelimiter = 0) + OUString getFSysPath(FSysStyle eStyle, sal_Unicode * pDelimiter = nullptr) const; // Data URLs: |