CScriptTemplate: Make use of size_t where applicable

Plays nicer with standard containers and eliminates implicit truncation
warnings.
This commit is contained in:
Lioncash 2020-06-18 06:54:53 -04:00
parent 3bd84d8c41
commit 0cda26b105
2 changed files with 4 additions and 4 deletions

View File

@ -153,9 +153,9 @@ public:
bool IsVisible() const { return mVisible; }
TString SourceFile() const { return mSourceFile; }
CStructProperty* Properties() const { return mpProperties.get(); }
uint32 NumAttachments() const { return mAttachments.size(); }
const SAttachment& Attachment(uint32 Index) const { return mAttachments[Index]; }
const std::vector<TString>& RequiredModules() const { return mModules; }
size_t NumAttachments() const { return mAttachments.size(); }
const SAttachment& Attachment(size_t Index) const { return mAttachments[Index]; }
const std::vector<TString>& RequiredModules() const { return mModules; }
CStringProperty* NameProperty() const { return mpNameProperty; }
CVectorProperty* PositionProperty() const { return mpPositionProperty; }

View File

@ -54,7 +54,7 @@ CScriptNode::CScriptNode(CScene *pScene, uint32 NodeID, CSceneNode *pParent, CSc
}
// Create attachment nodes
for (uint32 iAttach = 0; iAttach < pTemp->NumAttachments(); iAttach++)
for (size_t iAttach = 0; iAttach < pTemp->NumAttachments(); iAttach++)
{
const SAttachment& rkAttach = pTemp->Attachment(iAttach);
CScriptAttachNode *pAttach = new CScriptAttachNode(pScene, rkAttach, this);