From 9181229b34e1374f1b564fed637088bca4535ae0 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 13 Feb 2012 18:39:41 -0800 Subject: Updating the pathfinding character initialization to match the new data type for CPU time. --- indra/newview/llfloaterpathfindingcharacters.cpp | 2 +- indra/newview/llpathfindingcharacter.cpp | 5 ++--- indra/newview/llpathfindingcharacter.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview') 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; }; -- cgit v1.2.3