mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Some minor cleanup for readability
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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 ©) : 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 ©) { fUtf8Buffer = copy.fUtf8Buffer; return *this; }
|
||||
plString &operator=(const plStringBuffer<char> &init);
|
||||
|
@ -78,7 +78,7 @@ class pfKIMsg : public plMessage
|
||||
void IInit()
|
||||
{
|
||||
fCommand = kNoCommand;
|
||||
fString = plString();
|
||||
fString = "";
|
||||
fUser = nil;
|
||||
fPlayerID = 0;
|
||||
fFlags = 0;
|
||||
|
@ -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 );
|
||||
|
@ -223,7 +223,7 @@ plString pySceneObject::GetName()
|
||||
{
|
||||
if ( fSceneObjects.Count() > 0 )
|
||||
return fSceneObjects[0]->GetName();
|
||||
return plString();
|
||||
return "";
|
||||
}
|
||||
|
||||
PyObject* pySceneObject::findObj(const plString& name)
|
||||
|
@ -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 );
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user