Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-05-17 13:30:27 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-05-17 13:30:27 +0300
commitb520c95221b899938e0e35dc460956622486242e (patch)
tree964ebce66456b0e67bc1b48963ff1be6a36b9355 /src/ObjectModel
parenta4e104a1ec566122be81ec48af9e02bf7aeafca8 (diff)
Use function_ref in preference to inplace_function
Diffstat (limited to 'src/ObjectModel')
-rw-r--r--src/ObjectModel/Variable.cpp2
-rw-r--r--src/ObjectModel/Variable.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ObjectModel/Variable.cpp b/src/ObjectModel/Variable.cpp
index 65e6b55f..fd07fee4 100644
--- a/src/ObjectModel/Variable.cpp
+++ b/src/ObjectModel/Variable.cpp
@@ -126,7 +126,7 @@ void VariableSet::AssignFrom(VariableSet& other) noexcept
other.root = nullptr;
}
-void VariableSet::IterateWhile(stdext::inplace_function<bool(unsigned int, const Variable&) /*noexcept*/ > func) const noexcept
+void VariableSet::IterateWhile(function_ref<bool(unsigned int, const Variable&) /*noexcept*/ > func) const noexcept
{
unsigned int num = 0;
for (const Variable *v = root; v != nullptr; v = v->GetNext())
diff --git a/src/ObjectModel/Variable.h b/src/ObjectModel/Variable.h
index 28717688..b9f047aa 100644
--- a/src/ObjectModel/Variable.h
+++ b/src/ObjectModel/Variable.h
@@ -12,6 +12,7 @@
#include <General/FreelistManager.h>
#include <Platform/Heap.h>
#include <ObjectModel/ObjectModel.h>
+#include <General/function_ref.h>
// Class to represent a variable having a name and a value
class Variable
@@ -57,7 +58,7 @@ public:
void Delete(const char *str) noexcept;
void Clear() noexcept;
- void IterateWhile(stdext::inplace_function<bool(unsigned int index, const Variable& v) /*noexcept*/ > func) const noexcept;
+ void IterateWhile(function_ref<bool(unsigned int index, const Variable& v) /*noexcept*/ > func) const noexcept;
private:
Variable *root;