summaryrefslogtreecommitdiff
path: root/indra/newview/llwldaycycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwldaycycle.cpp')
-rw-r--r--indra/newview/llwldaycycle.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 80001525f8..e646b605a9 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -270,10 +270,10 @@ bool LLWLDayCycle::removeKeyframe(F32 time)
return false;
}
-bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time)
+bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time) const
{
// scroll through till we find the correct value in the map
- std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.begin();
+ std::map<F32, LLWLParamKey>::const_iterator mIt = mTimeMap.begin();
for(; mIt != mTimeMap.end(); ++mIt)
{
if(frame == mIt->second)
@@ -315,6 +315,12 @@ bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name)
return false;
}
+bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const
+{
+ F32 dummy;
+ return getKeytime(keyframe, dummy);
+}
+
void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe)
{
lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl;