mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-13 10:32:58 +01:00
Merge pull request #94 from wirenboard/fix/pass-by-ref
Pass visitor to validationCallback by ref
This commit is contained in:
commit
f7f3acf20c
@ -72,7 +72,7 @@ public:
|
||||
// Wrap the validationCallback() function below so that it will be
|
||||
// passed a reference to a constraint (_1), and a reference to the
|
||||
// visitor (*this).
|
||||
Subschema::ApplyFunction fn(std::bind(validationCallback, std::placeholders::_1, *this));
|
||||
Subschema::ApplyFunction fn(std::bind(validationCallback, std::placeholders::_1, std::ref(*this)));
|
||||
|
||||
// Perform validation against each constraint defined in the schema
|
||||
if (m_results == nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user