diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-02-13 18:39:41 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-02-13 18:39:41 -0800 |
commit | 9181229b34e1374f1b564fed637088bca4535ae0 (patch) | |
tree | 642386d1906aebe075ff46c5063ba6ee2023422a /indra/newview | |
parent | 76959fdb455e5fc3f08b0e1f61f13f14c0d87303 (diff) |
Updating the pathfinding character initialization to match the new data type for CPU time.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterpathfindingcharacters.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpathfindingcharacter.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llpathfindingcharacter.h | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index a64a9f5aa2..b697de0d04 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -459,7 +459,7 @@ void LLFloaterPathfindingCharacters::updateCharactersList() columns[2]["font"] = "SANSSERIF";
columns[3]["column"] = "cpu_time";
- columns[3]["value"] = llformat("%3d ms", character.getCPUTime());
+ columns[3]["value"] = llformat("%3.0f ms", character.getCPUTime());
columns[3]["font"] = "SANSSERIF";
columns[4]["column"] = "altitude";
diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp index e603356889..2fb48b0eea 100644 --- a/indra/newview/llpathfindingcharacter.cpp +++ b/indra/newview/llpathfindingcharacter.cpp @@ -66,9 +66,8 @@ LLPathfindingCharacter::LLPathfindingCharacter(const std::string &pUUID, const L LLAvatarNameCache::get(mOwnerUUID, &mOwnerName);
llassert(pCharacterItem.has(CHARACTER_CPU_TIME_FIELD));
- llassert(pCharacterItem.get(CHARACTER_CPU_TIME_FIELD).isInteger());
- llassert(pCharacterItem.get(CHARACTER_CPU_TIME_FIELD).asInteger() >= 0);
- mCPUTime = pCharacterItem.get(CHARACTER_CPU_TIME_FIELD).asInteger();
+ llassert(pCharacterItem.get(CHARACTER_CPU_TIME_FIELD).isReal());
+ mCPUTime = pCharacterItem.get(CHARACTER_CPU_TIME_FIELD).asReal();
llassert(pCharacterItem.has(CHARACTER_POSITION_FIELD));
llassert(pCharacterItem.get(CHARACTER_POSITION_FIELD).isArray());
diff --git a/indra/newview/llpathfindingcharacter.h b/indra/newview/llpathfindingcharacter.h index a7a17bc490..9b0a7bae30 100644 --- a/indra/newview/llpathfindingcharacter.h +++ b/indra/newview/llpathfindingcharacter.h @@ -48,7 +48,7 @@ public: inline const std::string& getName() const {return mName;};
inline const std::string& getDescription() const {return mDescription;};
inline const std::string getOwnerName() const {return mOwnerName.getCompleteName();};
- inline U32 getCPUTime() const {return mCPUTime;};
+ inline F32 getCPUTime() const {return mCPUTime;};
inline const LLVector3& getLocation() const {return mLocation;};
protected:
@@ -59,7 +59,7 @@ private: std::string mDescription;
LLUUID mOwnerUUID;
LLAvatarName mOwnerName;
- U32 mCPUTime;
+ F32 mCPUTime;
LLVector3 mLocation;
};
|