From c231e13dc273d773ec7ca75d78eda88a75a9f794 Mon Sep 17 00:00:00 2001 From: Khaled Noaman <knoaman@apache.org> Date: Thu, 22 Mar 2001 13:23:34 +0000 Subject: [PATCH] Minor modifications to eliminate compiler warnings. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172569 13f79535-47bb-0310-9956-ffa450edef68 --- src/util/regx/BMPattern.hpp | 3 ++- src/util/regx/RangeFactory.cpp | 19 +++++++++++++++++++ src/util/regx/RangeFactory.hpp | 15 --------------- src/util/regx/RegularExpression.hpp | 1 + src/util/regx/RegxDefs.hpp | 2 +- src/util/regx/RegxParser.hpp | 3 ++- src/util/regx/RegxUtil.hpp | 6 +++++- src/util/regx/TokenFactory.cpp | 17 +++++++++++++++++ src/util/regx/TokenFactory.hpp | 16 +--------------- src/util/regx/XMLUniCharacter.hpp | 4 ++-- 10 files changed, 50 insertions(+), 36 deletions(-) diff --git a/src/util/regx/BMPattern.hpp b/src/util/regx/BMPattern.hpp index 1aad6e409..c0ab53c41 100644 --- a/src/util/regx/BMPattern.hpp +++ b/src/util/regx/BMPattern.hpp @@ -179,4 +179,5 @@ inline void BMPattern::cleanUp() { /* * End of file BMPattern.hpp - */ \ No newline at end of file + */ + diff --git a/src/util/regx/RangeFactory.cpp b/src/util/regx/RangeFactory.cpp index d4e6ef0d7..807fbc31c 100644 --- a/src/util/regx/RangeFactory.cpp +++ b/src/util/regx/RangeFactory.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.2 2001/03/22 13:23:32 knoaman + * Minor modifications to eliminate compiler warnings. + * * Revision 1.1 2001/03/02 19:26:44 knoaman * Schema: Regular expression handling part II * @@ -68,6 +71,7 @@ #include <util/regx/RangeToken.hpp> #include <util/PlatformUtils.hpp> #include <util/regx/RegxDefs.hpp> +#include <stdlib.h> // --------------------------------------------------------------------------- // Static member data initialization @@ -235,6 +239,21 @@ void RangeFactory::initializeKeywordMap() { // Behavior defined at child level } + +// --------------------------------------------------------------------------- +// RangeFactory: Instance methods +// --------------------------------------------------------------------------- +RangeFactory* RangeFactory::instance() { + + if (!fInstance) { + + fInstance = new RangeFactory(); + atexit(RangeFactory::cleanUp); + } + + return (fInstance); +} + /** * End of file RangeFactory.cpp */ diff --git a/src/util/regx/RangeFactory.hpp b/src/util/regx/RangeFactory.hpp index d174de61a..cf1137a29 100644 --- a/src/util/regx/RangeFactory.hpp +++ b/src/util/regx/RangeFactory.hpp @@ -66,7 +66,6 @@ // --------------------------------------------------------------------------- #include <util/StringPool.hpp> #include <util/Mutexes.hpp> -#include <stdlib.h> // --------------------------------------------------------------------------- // Forward Declaration @@ -255,20 +254,6 @@ inline XMLStringPool* RangeFactory::getCategories() const { return fCategories; } -// --------------------------------------------------------------------------- -// RangeFactory: Instance methods -// --------------------------------------------------------------------------- -inline RangeFactory* RangeFactory::instance() { - - if (!fInstance) { - - fInstance = new RangeFactory(); - atexit(cleanUp); - } - - return (fInstance); -} - // --------------------------------------------------------------------------- // RangeFactory: cleanUp methods // --------------------------------------------------------------------------- diff --git a/src/util/regx/RegularExpression.hpp b/src/util/regx/RegularExpression.hpp index a0693f2c4..3611deac9 100644 --- a/src/util/regx/RegularExpression.hpp +++ b/src/util/regx/RegularExpression.hpp @@ -571,3 +571,4 @@ inline bool RegularExpression::matchIgnoreCase(const XMLInt32 ch1, /** * End of file RegularExpression.hpp */ + diff --git a/src/util/regx/RegxDefs.hpp b/src/util/regx/RegxDefs.hpp index 06ad38916..2d66d8d92 100644 --- a/src/util/regx/RegxDefs.hpp +++ b/src/util/regx/RegxDefs.hpp @@ -265,4 +265,4 @@ const XMLCh fgUniSymbol[] = /** * End of file RegxDefs.hpp */ - \ No newline at end of file + diff --git a/src/util/regx/RegxParser.hpp b/src/util/regx/RegxParser.hpp index fee85195a..562161ccc 100644 --- a/src/util/regx/RegxParser.hpp +++ b/src/util/regx/RegxParser.hpp @@ -310,4 +310,5 @@ inline int RegxParser::hexChar(const XMLInt32 ch) { /** * End file RegxParser.hpp - */ \ No newline at end of file + */ + diff --git a/src/util/regx/RegxUtil.hpp b/src/util/regx/RegxUtil.hpp index e55d982b2..fed0b0ed1 100644 --- a/src/util/regx/RegxUtil.hpp +++ b/src/util/regx/RegxUtil.hpp @@ -70,6 +70,11 @@ class XMLUTIL_EXPORT RegxUtil { public: + // ----------------------------------------------------------------------- + // Constructors and destructors + // ----------------------------------------------------------------------- + ~RegxUtil() {} + static XMLInt32 composeFromSurrogate(const XMLCh high, const XMLCh low); static bool isEOLChar(const XMLCh); static bool isWordChar(const XMLCh); @@ -83,7 +88,6 @@ private: // Unimplemented constructors and operators // ----------------------------------------------------------------------- RegxUtil(); - ~RegxUtil(); }; diff --git a/src/util/regx/TokenFactory.cpp b/src/util/regx/TokenFactory.cpp index 2ea07434e..162160ec4 100644 --- a/src/util/regx/TokenFactory.cpp +++ b/src/util/regx/TokenFactory.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.2 2001/03/22 13:23:34 knoaman + * Minor modifications to eliminate compiler warnings. + * * Revision 1.1 2001/03/02 19:23:00 knoaman * Schema: Regular expression handling part I * @@ -71,6 +74,7 @@ #include <util/regx/UnicodeRangeFactory.hpp> #include <util/regx/BlockRangeFactory.hpp> #include <util/regx/RegxDefs.hpp> +#include <stdlib.h> // --------------------------------------------------------------------------- // Static member data initialization @@ -392,6 +396,19 @@ Token* TokenFactory::getGraphemePattern() { } +// --------------------------------------------------------------------------- +// RangeFactory: Instance methods +// --------------------------------------------------------------------------- +TokenFactory* TokenFactory::instance() { + + if (!fInstance) { + + fInstance = new TokenFactory(); + atexit(TokenFactory::cleanUp); + } + + return (fInstance); +} // --------------------------------------------------------------------------- diff --git a/src/util/regx/TokenFactory.hpp b/src/util/regx/TokenFactory.hpp index f745ef2c2..26688a6cf 100644 --- a/src/util/regx/TokenFactory.hpp +++ b/src/util/regx/TokenFactory.hpp @@ -69,7 +69,6 @@ #include <util/RefVectorOf.hpp> #include <util/regx/Token.hpp> #include <util/Mutexes.hpp> -#include <stdlib.h> // --------------------------------------------------------------------------- // Forward Declaration @@ -191,20 +190,6 @@ private: }; -// --------------------------------------------------------------------------- -// RangeFactory: Instance methods -// --------------------------------------------------------------------------- -inline TokenFactory* TokenFactory::instance() { - - if (!fInstance) { - - fInstance = new TokenFactory(); - atexit(cleanUp); - } - - return (fInstance); -} - // --------------------------------------------------------------------------- // RangeFactory: Instance methods // --------------------------------------------------------------------------- @@ -219,3 +204,4 @@ inline void TokenFactory::cleanUp() { /** * End file TokenFactory */ + diff --git a/src/util/regx/XMLUniCharacter.hpp b/src/util/regx/XMLUniCharacter.hpp index ab4e4ea59..f980c53c0 100644 --- a/src/util/regx/XMLUniCharacter.hpp +++ b/src/util/regx/XMLUniCharacter.hpp @@ -107,6 +107,8 @@ public: FINAL_PUNCTUATION = 29 }; + /** destructor */ + ~XMLUniCharacter() {} /* Static methods for getting unicode character type */ /** @name Getter functions */ @@ -125,8 +127,6 @@ private : //@{ /** Unimplemented default constructor */ XMLUniCharacter(); - /** Unimplemented destructor */ - ~XMLUniCharacter(); //@} }; -- GitLab