[mapguide-commits] r1221 - in trunk/MgDev: Common/Foundation/Data
Common/Foundation/System Web/src/HttpHandler
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Mar 14 12:42:43 EDT 2007
Author: trevorwekel
Date: 2007-03-14 12:42:43 -0400 (Wed, 14 Mar 2007)
New Revision: 1221
Modified:
trunk/MgDev/Common/Foundation/Data/NamedCollection.cpp
trunk/MgDev/Common/Foundation/System/ClassFactory.cpp
trunk/MgDev/Common/Foundation/System/ClassFactory.h
trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
Log:
Compilation fixes for RHEL4
Modified: trunk/MgDev/Common/Foundation/Data/NamedCollection.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/Data/NamedCollection.cpp 2007-03-14 16:25:26 UTC (rev 1220)
+++ trunk/MgDev/Common/Foundation/Data/NamedCollection.cpp 2007-03-14 16:42:43 UTC (rev 1221)
@@ -587,7 +587,7 @@
//////////////////////////////////////////////////////////////////
STRING MgNamedCollection::Lower(STRING str) const
{
- transform(str.begin(), str.end(), str.begin(), tolower);
+ transform(str.begin(), str.end(), str.begin(), ::tolower);
return str;
}
Modified: trunk/MgDev/Common/Foundation/System/ClassFactory.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/ClassFactory.cpp 2007-03-14 16:25:26 UTC (rev 1220)
+++ trunk/MgDev/Common/Foundation/System/ClassFactory.cpp 2007-03-14 16:42:43 UTC (rev 1221)
@@ -17,26 +17,24 @@
#include "Foundation.h"
-// Process-wide MgClassFactory
-Ptr<MgClassFactory> MgClassFactory::m_classFactory = (MgClassFactory*)NULL;
-
MgClassFactory::MgClassFactory()
{
}
MgClassFactory* MgClassFactory::GetInstance()
{
+ static Ptr<MgClassFactory> classFactory;
MG_TRY()
ACE_TRACE ("MgClassFactory::GetInstance");
- if (MgClassFactory::m_classFactory == NULL)
+ if (classFactory == NULL)
{
// Perform Double-Checked Locking Optimization.
ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, *ACE_Static_Object_Lock::instance (), 0));
- if (MgClassFactory::m_classFactory == NULL)
+ if (classFactory == NULL)
{
- MgClassFactory::m_classFactory = new MgClassFactory();
+ classFactory = new MgClassFactory();
}
}
@@ -44,7 +42,7 @@
// To avoid overhead and maintain thread safety,
// do not assign this returned static singleton to a Ptr object.
- return MgClassFactory::m_classFactory;
+ return classFactory;
}
Modified: trunk/MgDev/Common/Foundation/System/ClassFactory.h
===================================================================
--- trunk/MgDev/Common/Foundation/System/ClassFactory.h 2007-03-14 16:25:26 UTC (rev 1220)
+++ trunk/MgDev/Common/Foundation/System/ClassFactory.h 2007-03-14 16:42:43 UTC (rev 1221)
@@ -73,11 +73,6 @@
/////////////////////////////////////////////////////////////////
/// \brief
- /// Internal singleton variable
- static Ptr<MgClassFactory> m_classFactory;
-
- /////////////////////////////////////////////////////////////////
- /// \brief
/// Declaration of class Registry
std::map<int, ClassCreatorFunc> m_classCreators;
Modified: trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp 2007-03-14 16:25:26 UTC (rev 1220)
+++ trunk/MgDev/Web/src/HttpHandler/HttpRequest.cpp 2007-03-14 16:42:43 UTC (rev 1221)
@@ -220,7 +220,7 @@
}
if(sParamValue.length() > 0)
{
- transform(sParamValue.begin(), sParamValue.end(), sParamValue.begin(), toupper);
+ transform(sParamValue.begin(), sParamValue.end(), sParamValue.begin(), ::toupper);
// Get handler to requested function
Ptr<MgHttpRequestResponseHandler> rrHandler = CreateRequestResponseHandler(sParamValue, result);
More information about the mapguide-commits
mailing list