mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Toss lots of custom CString code
We already have a C standard library, so let's not reimplement it.
This commit is contained in:
@ -68,7 +68,9 @@ static uint16_t kClassType = CLASS_INDEX_SCOPED(plSceneNode);
|
||||
static uint32_t kCloneID = 0;
|
||||
hsBool IsTrackedKey(const plKeyImp* key)
|
||||
{
|
||||
return hsStrEQ(key->GetName(), kObjName) && key->GetUoid().GetClassType() == kClassType && key->GetUoid().GetCloneID() == kCloneID;
|
||||
return (strcmp(key->GetName(), kObjName) == 0) &&
|
||||
key->GetUoid().GetClassType() == kClassType &&
|
||||
key->GetUoid().GetCloneID() == kCloneID;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -367,11 +367,10 @@ int plMsgXtlStringHelper::Peek(xtl::istring & stringref, hsStream* stream, const
|
||||
// STATIC
|
||||
int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const uint32_t peekOptions)
|
||||
{
|
||||
plMessage::plStrLen strlen;
|
||||
strlen = (str)?hsStrlen(str):0;
|
||||
stream->WriteLE(strlen);
|
||||
plMessage::plStrLen len = (str) ? strlen(str) : 0;
|
||||
stream->WriteLE(len);
|
||||
if (strlen)
|
||||
stream->Write(strlen,str);
|
||||
stream->Write(len,str);
|
||||
return stream->GetPosition();
|
||||
}
|
||||
|
||||
|
@ -100,9 +100,9 @@ const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, hsBool32 save, hsSt
|
||||
stream->WriteByte(1);
|
||||
// I need to write a key to MY stream...
|
||||
#if 0 // DEBUG
|
||||
int32_t len = hsStrlen(key->GetName());
|
||||
stream->WriteLE32(len);
|
||||
stream->Write(len, key->GetName());
|
||||
plStringBuffer<char> buf = key->GetName()->ToIso8859_1();
|
||||
stream->WriteLE32(buf.GetSize());
|
||||
stream->Write(buf.GetSize(), buf.GetData());
|
||||
#endif
|
||||
key->GetUoid().Write(stream);
|
||||
}
|
||||
|
Reference in New Issue
Block a user