From ecb7d8b5665c02080ae641cb681665ecf15f26c5 Mon Sep 17 00:00:00 2001 From: Zrax Date: Wed, 6 Apr 2011 19:44:10 -0700 Subject: [PATCH] Fix a few issues with more strict modern compilers --- .../Plasma/FeatureLib/pfPython/cyAccountManagement.cpp | 2 +- .../Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp | 4 ++-- .../Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h | 3 +++ .../Plasma/PubUtilLib/plNetClient/plNetClientGroup.h | 6 +++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp index 2a62ae66..06859411 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyAccountManagement.cpp @@ -51,7 +51,7 @@ PyObject* cyAccountManagement::GetPlayerList() for (int i = 0; i < numPlayers; ++i) { PyObject* playerTuple = PyTuple_New(3); - PyObject* playerName = PyUnicode_FromUnicode(playerList[i].playerName, wcslen(playerList[i].playerName)); + PyObject* playerName = PyUnicode_FromUnicode((const Py_UNICODE*)playerList[i].playerName, wcslen(playerList[i].playerName)); PyObject* playerId = PyInt_FromLong(playerList[i].playerInt); PyObject* avatarShape = PyString_FromString(playerList[i].avatarDatasetName); diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp index d494bb02..a4764d0f 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAgeDescription/plAgeDescription.cpp @@ -202,8 +202,8 @@ void plAgeDescription::SetAgeNameFromPath( const char *path ) } // Construct our name from the path - char *pathSep1 = strrchr( path, '\\' ); - char *pathSep2 = strrchr( path, '/' ); + const char *pathSep1 = strrchr( path, '\\' ); + const char *pathSep2 = strrchr( path, '/' ); if( pathSep2 > pathSep1 ) pathSep1 = pathSep2; if( pathSep1 == nil ) diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h index e1d3c63e..58db61a1 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAvatar/plAGApplicator.h @@ -145,6 +145,9 @@ protected: plSimulationInterface * IGetSI(const plAGModifier *modifier) const; plObjInterface * IGetGI(const plAGModifier *modifier, UInt16 classIdx) const; + // Allow plAGModifier to declare IGet?? as friends + friend class plAGModifier; + // -- members -- plAGChannel *fChannel; hsBool fEnabled; diff --git a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h index 35e17c3a..f4a2f567 100644 --- a/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h +++ b/MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plNetClient/plNetClientGroup.h @@ -83,7 +83,11 @@ public: { std::set::iterator it=IFind(grpId); if (it != fGroups.end()) - (*it).fOwnIt=ownIt; + { + OwnedGroup grp(it->fGroup, it->fOwnIt); + fGroups.erase(it); + fGroups.insert(grp); + } else { ISetGroupDesc(grpId);