|
@@ -254,7 +254,7 @@ namespace robotics {
|
|
|
alllist.push_back(std::pair(source_[i], source_ok_[i]));
|
|
|
}
|
|
|
std::sort(alllist.begin(), alllist.end(), [&fn](std::pair<_Type, bool> const& val1, std::pair<_Type, bool> const& val2) {
|
|
|
- return fn(&val1.first, &val2.first);});
|
|
|
+ return fn(&val1.first, &val2.first); });
|
|
|
source_.clear();
|
|
|
source_ok_.clear();
|
|
|
for (std::int64_t i = 0; i < alllist.size(); ++i) {
|
|
@@ -885,11 +885,11 @@ namespace robotics {
|
|
|
return first();
|
|
|
}
|
|
|
/**
|
|
|
- * @brief
|
|
|
- * @return
|
|
|
+ * @brief
|
|
|
+ * @return
|
|
|
*/
|
|
|
bool empty() {
|
|
|
- for (auto& it : source_ok_) {
|
|
|
+ for (bool it : source_ok_) {
|
|
|
if (it) {
|
|
|
return true;
|
|
|
}
|
|
@@ -902,7 +902,7 @@ namespace robotics {
|
|
|
std::vector<std::function<void(_Type const&, _Type const&, linq_change_type, bool)>> changed_event;
|
|
|
private:
|
|
|
std::mutex mutex_;
|
|
|
- std::vector<_Type>& source_;
|
|
|
+ std::vector<_Type>& source_;
|
|
|
std::vector<bool> source_ok_;
|
|
|
std::vector<std::tuple<_Type, _Type, linq_change_type>> changed_list_;
|
|
|
};
|
|
@@ -1383,7 +1383,7 @@ namespace robotics {
|
|
|
* @return
|
|
|
*/
|
|
|
template<typename _Param>
|
|
|
- linq_ptr inc(_Param& value) {
|
|
|
+ linq_ptr& inc(_Param& value) {
|
|
|
++value;
|
|
|
return *this;
|
|
|
}
|
|
@@ -1762,18 +1762,18 @@ namespace robotics {
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
- /**
|
|
|
- * @brief
|
|
|
- * @return
|
|
|
- */
|
|
|
- bool empty() {
|
|
|
- for (auto& it : source_ok_) {
|
|
|
- if (it) {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * @brief
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ bool empty() {
|
|
|
+ for (bool it : source_ok_) {
|
|
|
+ if (it) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
- }
|
|
|
+ }
|
|
|
/**
|
|
|
* @brief 获取值
|
|
|
*/
|
|
@@ -1787,7 +1787,7 @@ namespace robotics {
|
|
|
private:
|
|
|
std::mutex mutex_;
|
|
|
std::vector<bool> source_ok_;
|
|
|
- std::vector<std::shared_ptr<_Type>>& source_;
|
|
|
+ std::vector<std::shared_ptr<_Type>>& source_;
|
|
|
std::vector<std::tuple<_Type, _Type, linq_change_type>> changed_list_;
|
|
|
};
|
|
|
/**
|