Browse Source

Some minor cleanup for readability

Michael Hansen 12 years ago
parent
commit
c68724765b
  1. 4
      Sources/Plasma/CoreLib/plGeneric.cpp
  2. 4
      Sources/Plasma/CoreLib/plString.h
  3. 2
      Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h
  4. 8
      Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h
  5. 2
      Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp
  6. 2
      Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp
  7. 2
      Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp
  8. 2
      Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp
  9. 2
      Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp
  10. 4
      Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp
  11. 4
      Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

4
Sources/Plasma/CoreLib/plGeneric.cpp

@ -59,7 +59,7 @@ void plGeneric::IReset()
fBoolVal = false;
fIntVal = 0;
fFloatVal = 0.0;
fStringVal = plString();
fStringVal = "";
}
plGeneric& plGeneric::operator=(const bool& val)
@ -148,4 +148,4 @@ int plGeneric::Read(hsStream* stream)
break;
}
return stream->GetPosition();
}
}

4
Sources/Plasma/CoreLib/plString.h

@ -164,13 +164,13 @@ public:
plString() { }
#ifndef PLSTRING_POLLUTE_ASCII_CAST
plString(const char *ascii) { IConvertFromUtf8(ascii, kSizeAuto); }
plString(const char *cstr) { IConvertFromUtf8(cstr, kSizeAuto); }
#endif
plString(const plString &copy) : fUtf8Buffer(copy.fUtf8Buffer) { }
plString(const plStringBuffer<char> &init) { operator=(init); }
#ifndef PLSTRING_POLLUTE_ASCII_CAST
plString &operator=(const char *ascii) { IConvertFromUtf8(ascii, kSizeAuto); return *this; }
plString &operator=(const char *cstr) { IConvertFromUtf8(cstr, kSizeAuto); return *this; }
#endif
plString &operator=(const plString &copy) { fUtf8Buffer = copy.fUtf8Buffer; return *this; }
plString &operator=(const plStringBuffer<char> &init);

2
Sources/Plasma/FeatureLib/pfMessage/pfKIMsg.h

@ -78,7 +78,7 @@ class pfKIMsg : public plMessage
void IInit()
{
fCommand = kNoCommand;
fString = plString();
fString = "";
fUser = nil;
fPlayerID = 0;
fFlags = 0;

8
Sources/Plasma/FeatureLib/pfPython/pyJournalBook.h

@ -84,8 +84,8 @@ public:
// required functions for PyObject interoperability
PYTHON_CLASS_NEW_FRIEND(ptBook);
static PyObject *New(std::string htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
static PyObject *New(std::wstring htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
static PyObject *New(std::string htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = "");
static PyObject *New(std::wstring htmlSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = "");
PYTHON_CLASS_CHECK_DEFINITION; // returns true if the PyObject is a pyJournalBook object
PYTHON_CLASS_CONVERT_FROM_DEFINITION(pyJournalBook); // converts a PyObject to a pyJournalBook (throws error if not correct type)
@ -94,8 +94,8 @@ public:
static void AddPlasmaConstantsClasses(PyObject *m);
// Deletes the existing book and re-creates it, for use by the python glue
void MakeBook(std::string esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
void MakeBook(std::wstring esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = plString());
void MakeBook(std::string esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = "");
void MakeBook(std::wstring esHTMLSource, plKey coverImageKey = nil, plKey callbackKey = nil, plString guiName = "");
// Interface functions per book
virtual void Show( bool startOpened );

2
Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp

@ -223,7 +223,7 @@ plString pySceneObject::GetName()
{
if ( fSceneObjects.Count() > 0 )
return fSceneObjects[0]->GetName();
return plString();
return "";
}
PyObject* pySceneObject::findObj(const plString& name)

2
Sources/Plasma/NucleusLib/pnUUID/pnUUID_Win32.cpp

@ -90,7 +90,7 @@ bool plUUID::FromString( const char * str )
bool plUUID::ToString( plString & out ) const
{
out = plString();
out = "";
unsigned char * ubuf;
RPC_STATUS s;
s = UuidToString( (GUID *) this, &ubuf );

2
Sources/Plasma/PubUtilLib/plAvatar/plAvBrainCritter.cpp

@ -300,7 +300,7 @@ std::string plAvBrainCritter::BehaviorName(int behavior) const
plString plAvBrainCritter::AnimationName(int behavior) const
{
if ((behavior >= fBehaviors.Count()) || (behavior < 0))
return plString();
return "";
return ((CritterBehavior*)fBehaviors[behavior])->AnimName();
}

2
Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp

@ -1104,7 +1104,7 @@ int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, uint32_t peekOptions)
if (bytes)
{
// FIX ME to something nice
fMemberInfo.GetClientGuid()->SetClientKey(plString());
fMemberInfo.GetClientGuid()->SetClientKey("");
fMemberInfo.GetClientGuid()->SetAccountUUID(plUUID());
fMemberInfo.Poke(stream, peekOptions);
stream->WriteByte(fAddMember);

2
Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.cpp

@ -505,7 +505,7 @@ int plNetMsgMemberListHelper::Poke(hsStream* stream, const uint32_t peekOptions)
int i;
for(i=0;i<numMembers;i++)
{
fMembers[i]->GetClientGuid()->SetClientKey(plString());
fMembers[i]->GetClientGuid()->SetClientKey("");
fMembers[i]->GetClientGuid()->SetAccountUUID(plUUID());
fMembers[i]->Poke(stream, peekOptions);
}

4
Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp

@ -264,12 +264,12 @@ void plKeyFinder::IGetNames(std::vector<plString>& names, const plString& search
void plKeyFinder::GetResponderNames(std::vector<plString>& names)
{
IGetNames(names, plString(), CLASS_INDEX_SCOPED(plResponderModifier));
IGetNames(names, "", CLASS_INDEX_SCOPED(plResponderModifier));
}
void plKeyFinder::GetActivatorNames(std::vector<plString>& names)
{
IGetNames(names, plString(), CLASS_INDEX_SCOPED(plLogicModifier));
IGetNames(names, "", CLASS_INDEX_SCOPED(plLogicModifier));
}
class plKeyFinderIterator : public plRegistryKeyIterator, public plRegistryPageIterator

4
Sources/Plasma/PubUtilLib/plResMgr/plResManager.cpp

@ -921,7 +921,7 @@ plKey plResManager::ICloneKey(const plUoid& objUoid, uint32_t playerID, uint32_t
fCurCloneID = cloneID;
fCurClonePlayerID = playerID;
plKey cloneKey = ReRegister(plString(), objUoid);
plKey cloneKey = ReRegister("", objUoid);
fCurClonePlayerID = 0;
fCurCloneID = 0;
@ -1272,7 +1272,7 @@ public:
{
if (stricmp(page->GetPageInfo().GetAge(), fAgeName) == 0)
{
plUoid uoid(page->GetPageInfo().GetLocation(), 0, plString());
plUoid uoid(page->GetPageInfo().GetLocation(), 0, "");
fLocations.push_back(uoid.GetLocation());
}
return true;

Loading…
Cancel
Save