|
@@ -215,7 +215,7 @@ public:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- virtual void observe(double time)
|
|
|
|
|
|
+ virtual void observe(double time, bool trim)
|
|
{
|
|
{
|
|
for (typename Selectors::const_iterator it = _selectors.begin();
|
|
for (typename Selectors::const_iterator it = _selectors.begin();
|
|
it != _selectors.end(); ++it) {
|
|
it != _selectors.end(); ++it) {
|
|
@@ -232,29 +232,31 @@ public:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- bool ok = true;
|
|
|
|
- auto it = _values.begin();
|
|
|
|
|
|
+ if (trim) {
|
|
|
|
+ bool ok = true;
|
|
|
|
+ auto it = _values.begin();
|
|
|
|
|
|
- while (it != _values.end() and ok) {
|
|
|
|
- const auto &v = it->second.begin()->second;
|
|
|
|
|
|
+ while (it != _values.end() and ok) {
|
|
|
|
+ const auto &v = it->second.begin()->second;
|
|
|
|
|
|
- if (v.back().second.is_null()) {
|
|
|
|
- ++it;
|
|
|
|
- } else {
|
|
|
|
- if (v.size() > 1) {
|
|
|
|
- if (v.back().second == v[v.size() - 2].second) {
|
|
|
|
- ++it;
|
|
|
|
|
|
+ if (v.back().second.is_null()) {
|
|
|
|
+ ++it;
|
|
|
|
+ } else {
|
|
|
|
+ if (v.size() > 1) {
|
|
|
|
+ if (v.back().second == v[v.size() - 2].second) {
|
|
|
|
+ ++it;
|
|
|
|
+ } else {
|
|
|
|
+ ok = false;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
ok = false;
|
|
ok = false;
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- ok = false;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
- if (ok) {
|
|
|
|
- for (auto &v: _values) {
|
|
|
|
- v.second.begin()->second.pop_back();
|
|
|
|
|
|
+ if (ok) {
|
|
|
|
+ for (auto &v: _values) {
|
|
|
|
+ v.second.begin()->second.pop_back();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|