#include <algorithm>
#include <vector>
-namespace caspar { namespace core {
+namespace caspar {
typedef std::function<double(double, double, double, double)> tweener_t;
params.push_back(boost::lexical_cast<double>(what["V1"].str()));
}
- auto tweens = get_tweens();
-
- auto it = tweens.find(name);
- if(it == tweens.end())
+ auto it = get_tweens().find(name);
+ if(it == get_tweens().end())
CASPAR_THROW_EXCEPTION(invalid_argument() << msg_info("Could not find tween.") << arg_value_info(name));
auto tween = it->second;
return func_(t, b, c, d);
}
-const std::vector<const std::wstring>& tweener::names()
+const std::vector<std::wstring>& tweener::names()
{
- static const auto names = cpplinq::from(get_tweens())
+ /*static const auto names = cpplinq::from(get_tweens())
.select(keys())
- .to_vector();
+ .to_vector();*/
+
+ static const auto result = []
+ {
+ std::vector<std::wstring> result;
- return names;
+ for (auto& tween : get_tweens())
+ result.push_back(tween.first);
+
+ return result;
+ }();
+ //static const std::vector<std::wstring> result;
+
+ return result;
}
-}}
+}