AO cleanup. const references are good.
parent
67c8724090
commit
36225fb9e0
|
|
@ -359,7 +359,7 @@ void FloaterAO::onClickActivate()
|
|||
AOEngine::instance().selectSet(mSelectedSet);
|
||||
}
|
||||
|
||||
LLScrollListItem* FloaterAO::addAnimation(const std::string name)
|
||||
LLScrollListItem* FloaterAO::addAnimation(const std::string& name)
|
||||
{
|
||||
LLSD row;
|
||||
row["columns"][0]["type"]="icon";
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class FloaterAO
|
|||
EAcceptance* accept,std::string& tooltip_msg);
|
||||
|
||||
protected:
|
||||
LLScrollListItem* addAnimation(const std::string name);
|
||||
LLScrollListItem* addAnimation(const std::string& name);
|
||||
|
||||
void onSelectSet();
|
||||
void onSelectSetSmall();
|
||||
|
|
|
|||
|
|
@ -125,13 +125,13 @@ void AOEngine::stopAllSitVariants()
|
|||
gAgentAvatarp->LLCharacter::stopMotion(ANIM_AGENT_SIT_GROUND_CONSTRAINED);
|
||||
}
|
||||
|
||||
void AOEngine::setLastMotion(LLUUID motion)
|
||||
void AOEngine::setLastMotion(const LLUUID& motion)
|
||||
{
|
||||
if(motion!=ANIM_AGENT_TYPE)
|
||||
mLastMotion=motion;
|
||||
}
|
||||
|
||||
void AOEngine::setLastOverriddenMotion(LLUUID motion)
|
||||
void AOEngine::setLastOverriddenMotion(const LLUUID& motion)
|
||||
{
|
||||
if(motion!=ANIM_AGENT_TYPE)
|
||||
mLastOverriddenMotion=motion;
|
||||
|
|
@ -148,7 +148,7 @@ BOOL AOEngine::foreignAnimations()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
LLUUID AOEngine::mapSwimming(LLUUID motion)
|
||||
const LLUUID& AOEngine::mapSwimming(const LLUUID& motion) const
|
||||
{
|
||||
S32 stateNum;
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ void AOEngine::setStateCycleTimer(const AOSet::AOState* state)
|
|||
mCurrentSet->startTimer(timeout);
|
||||
}
|
||||
|
||||
const LLUUID AOEngine::override(const LLUUID pMotion,BOOL start)
|
||||
const LLUUID AOEngine::override(const LLUUID& pMotion,BOOL start)
|
||||
{
|
||||
LLUUID animation;
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ void AOEngine::updateSortOrder(AOSet::AOState* state)
|
|||
}
|
||||
}
|
||||
|
||||
LLUUID AOEngine::addSet(const std::string name,BOOL reload)
|
||||
LLUUID AOEngine::addSet(const std::string& name,BOOL reload)
|
||||
{
|
||||
if(mAOFolder.isNull())
|
||||
{
|
||||
|
|
@ -702,7 +702,7 @@ BOOL AOEngine::addAnimation(const AOSet* set,AOSet::AOState* state,const LLInven
|
|||
}
|
||||
|
||||
// needs a three-step process, since purge of categories only seems to work from trash
|
||||
void AOEngine::purgeFolder(LLUUID uuid)
|
||||
void AOEngine::purgeFolder(const LLUUID& uuid) const
|
||||
{
|
||||
// unprotect it
|
||||
BOOL wasProtected=gSavedPerAccountSettings.getBOOL("ProtectAOFolders");
|
||||
|
|
@ -1024,7 +1024,7 @@ void AOEngine::reload( bool aFromTimer )
|
|||
enable(TRUE);
|
||||
}
|
||||
|
||||
AOSet* AOEngine::getSetByName(const std::string name)
|
||||
AOSet* AOEngine::getSetByName(const std::string& name) const
|
||||
{
|
||||
AOSet* found=0;
|
||||
for(U32 index=0;index<mSets.size();index++)
|
||||
|
|
@ -1072,7 +1072,7 @@ void AOEngine::selectSet(AOSet* set)
|
|||
}
|
||||
}
|
||||
|
||||
AOSet* AOEngine::selectSetByName(const std::string name)
|
||||
AOSet* AOEngine::selectSetByName(const std::string& name)
|
||||
{
|
||||
AOSet* set=getSetByName(name);
|
||||
if(set)
|
||||
|
|
@ -1124,7 +1124,7 @@ void AOEngine::saveSet(const AOSet* set)
|
|||
mUpdatedSignal();
|
||||
}
|
||||
|
||||
BOOL AOEngine::renameSet(AOSet* set,const std::string name)
|
||||
BOOL AOEngine::renameSet(AOSet* set,const std::string& name)
|
||||
{
|
||||
if(name.empty() || name.find(":")!=std::string::npos)
|
||||
return FALSE;
|
||||
|
|
@ -1628,7 +1628,7 @@ void AOEngine::processImport( bool aFromTimer )
|
|||
}
|
||||
}
|
||||
|
||||
const LLUUID AOEngine::getAOFolder()
|
||||
const LLUUID& AOEngine::getAOFolder() const
|
||||
{
|
||||
return mAOFolder;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,16 +98,16 @@ class AOEngine
|
|||
};
|
||||
|
||||
void enable(BOOL yes);
|
||||
const LLUUID override(const LLUUID motion,BOOL start);
|
||||
const LLUUID override(const LLUUID& motion,BOOL start);
|
||||
void tick();
|
||||
void update();
|
||||
void reload(bool);
|
||||
void reloadStateAnimations(AOSet::AOState* state);
|
||||
void clear( bool );
|
||||
|
||||
const LLUUID getAOFolder();
|
||||
const LLUUID& getAOFolder() const;
|
||||
|
||||
LLUUID addSet(const std::string name,BOOL reload=TRUE);
|
||||
LLUUID addSet(const std::string& name,BOOL reload=TRUE);
|
||||
BOOL removeSet(AOSet* set);
|
||||
|
||||
BOOL addAnimation(const AOSet* set,AOSet::AOState* state,const LLInventoryItem* item,BOOL reload=TRUE);
|
||||
|
|
@ -126,8 +126,8 @@ class AOEngine
|
|||
|
||||
void inMouselook(BOOL yes);
|
||||
void selectSet(AOSet* set);
|
||||
AOSet* selectSetByName(const std::string name);
|
||||
AOSet* getSetByName(const std::string name);
|
||||
AOSet* selectSetByName(const std::string& name);
|
||||
AOSet* getSetByName(const std::string& name) const;
|
||||
|
||||
// callback from LLAppViewer
|
||||
static void onLoginComplete();
|
||||
|
|
@ -135,7 +135,7 @@ class AOEngine
|
|||
const std::vector<AOSet*> getSetList() const;
|
||||
const std::string getCurrentSetName() const;
|
||||
const AOSet* getDefaultSet() const;
|
||||
BOOL renameSet(AOSet* set,const std::string name);
|
||||
BOOL renameSet(AOSet* set,const std::string& name);
|
||||
|
||||
void setDefaultSet(AOSet* set);
|
||||
void setOverrideSits(AOSet* set,BOOL yes);
|
||||
|
|
@ -153,22 +153,22 @@ class AOEngine
|
|||
protected:
|
||||
void init();
|
||||
|
||||
void setLastMotion(LLUUID motion);
|
||||
void setLastOverriddenMotion(LLUUID motion);
|
||||
void setLastMotion(const LLUUID& motion);
|
||||
void setLastOverriddenMotion(const LLUUID& motion);
|
||||
void setStateCycleTimer(const AOSet::AOState* state);
|
||||
|
||||
void stopAllStandVariants();
|
||||
void stopAllSitVariants();
|
||||
|
||||
BOOL foreignAnimations();
|
||||
LLUUID mapSwimming(LLUUID motion);
|
||||
const LLUUID& mapSwimming(const LLUUID& motion) const;
|
||||
|
||||
void updateSortOrder(AOSet::AOState* state);
|
||||
void saveSet(const AOSet* set);
|
||||
void saveState(const AOSet::AOState* state);
|
||||
|
||||
BOOL createAnimationLink(const AOSet* set,AOSet::AOState* state,const LLInventoryItem* item);
|
||||
void purgeFolder(LLUUID uuid);
|
||||
void purgeFolder(const LLUUID& uuid) const;
|
||||
|
||||
static void onNotecardLoadComplete( LLVFS* vfs,const LLUUID& assetUUID,LLAssetType::EType type,
|
||||
void* userdata,S32 status,LLExtStat extStatus);
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ AOSet::AOState* AOSet::getState(S32 eName)
|
|||
return &mStates[eName];
|
||||
}
|
||||
|
||||
AOSet::AOState* AOSet::getStateByName(const std::string name)
|
||||
AOSet::AOState* AOSet::getStateByName(const std::string& name)
|
||||
{
|
||||
for(S32 index=0;index<AOSTATES_MAX;index++)
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ AOSet::AOState* AOSet::getStateByName(const std::string name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
AOSet::AOState* AOSet::getStateByRemapID(const LLUUID id)
|
||||
AOSet::AOState* AOSet::getStateByRemapID(const LLUUID& id)
|
||||
{
|
||||
for(S32 index=0;index<AOSTATES_MAX;index++)
|
||||
{
|
||||
|
|
@ -159,7 +159,7 @@ AOSet::AOState* AOSet::getStateByRemapID(const LLUUID id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
LLUUID AOSet::getAnimationForState(AOState* state)
|
||||
const LLUUID& AOSet::getAnimationForState(AOState* state) const
|
||||
{
|
||||
if(state)
|
||||
{
|
||||
|
|
@ -209,22 +209,22 @@ BOOL AOSet::tick()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
const LLUUID AOSet::getInventoryUUID() const
|
||||
const LLUUID& AOSet::getInventoryUUID() const
|
||||
{
|
||||
return mInventoryID;
|
||||
}
|
||||
|
||||
void AOSet::setInventoryUUID(const LLUUID inventoryID)
|
||||
void AOSet::setInventoryUUID(const LLUUID& inventoryID)
|
||||
{
|
||||
mInventoryID=inventoryID;
|
||||
}
|
||||
|
||||
const std::string AOSet::getName() const
|
||||
const std::string& AOSet::getName() const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
void AOSet::setName(std::string name)
|
||||
void AOSet::setName(const std::string& name)
|
||||
{
|
||||
mName=name;
|
||||
}
|
||||
|
|
@ -279,12 +279,12 @@ void AOSet::setDirty(BOOL yes)
|
|||
mDirty=yes;
|
||||
}
|
||||
|
||||
void AOSet::setMotion(const LLUUID motion)
|
||||
void AOSet::setMotion(const LLUUID& motion)
|
||||
{
|
||||
mCurrentMotion=motion;
|
||||
}
|
||||
|
||||
LLUUID AOSet::getMotion() const
|
||||
const LLUUID& AOSet::getMotion() const
|
||||
{
|
||||
return mCurrentMotion;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,11 +89,11 @@ class AOSet
|
|||
BOOL mDirty;
|
||||
};
|
||||
|
||||
const LLUUID getInventoryUUID() const;
|
||||
void setInventoryUUID(const LLUUID inventoryID);
|
||||
const LLUUID& getInventoryUUID() const;
|
||||
void setInventoryUUID(const LLUUID& inventoryID);
|
||||
|
||||
const std::string getName() const;
|
||||
void setName(std::string name);
|
||||
const std::string& getName() const;
|
||||
void setName(const std::string& name);
|
||||
|
||||
BOOL getSitOverride() const;
|
||||
void setSitOverride(BOOL yes);
|
||||
|
|
@ -107,16 +107,16 @@ class AOSet
|
|||
BOOL getComplete() const;
|
||||
void setComplete(BOOL yes);
|
||||
|
||||
LLUUID getMotion() const;
|
||||
void setMotion(const LLUUID motion);
|
||||
const LLUUID& getMotion() const;
|
||||
void setMotion(const LLUUID& motion);
|
||||
|
||||
BOOL getDirty() const;
|
||||
void setDirty(BOOL yes);
|
||||
|
||||
AOState* getState(S32 eName);
|
||||
AOState* getStateByName(const std::string name);
|
||||
AOState* getStateByRemapID(const LLUUID id);
|
||||
LLUUID getAnimationForState(AOState* state);
|
||||
AOState* getStateByName(const std::string& name);
|
||||
AOState* getStateByRemapID(const LLUUID& id);
|
||||
const LLUUID& getAnimationForState(AOState* state) const;
|
||||
|
||||
void startTimer(F32 timeout);
|
||||
void stopTimer();
|
||||
|
|
|
|||
Loading…
Reference in New Issue