diff --git a/src/DataTree.cc b/src/DataTree.cc index 6deb8b797e2b829c5bc5ee9420105f8a56f3f501..3f7b452ee66b8b2aaa909dc44764bd8a8c3ce30a 100644 --- a/src/DataTree.cc +++ b/src/DataTree.cc @@ -959,8 +959,8 @@ DataTree::writeToFileIfModified(stringstream& new_contents, const filesystem::pa { ifstream old_file {filename, ios::in | ios::binary}; if (old_file.is_open() - && equal(istreambuf_iterator<char> {old_file}, istreambuf_iterator<char> {}, - istreambuf_iterator<char> {new_contents}, istreambuf_iterator<char> {})) + && ranges::equal(istreambuf_iterator<char> {old_file}, istreambuf_iterator<char> {}, + istreambuf_iterator<char> {new_contents}, istreambuf_iterator<char> {})) return; old_file.close(); diff --git a/src/macro/Expressions.cc b/src/macro/Expressions.cc index b1e671a93343928c9c4078b5452415340acce138..04a33a8b92c0ac839ad2bb696e187341d0b72b53 100644 --- a/src/macro/Expressions.cc +++ b/src/macro/Expressions.cc @@ -1,5 +1,5 @@ /* - * Copyright © 2019-2023 Dynare Team + * Copyright © 2019-2024 Dynare Team * * This file is part of Dynare. * @@ -316,10 +316,10 @@ String::cast_bool([[maybe_unused]] Environment& env) const { auto f = [](const char& a, const char& b) { return (tolower(a) == tolower(b)); }; - if (string tf = "true"; equal(value.begin(), value.end(), tf.begin(), tf.end(), f)) + if (ranges::equal(value, "true"s, f)) return make_shared<Bool>(true); - if (string tf = "false"; equal(value.begin(), value.end(), tf.begin(), tf.end(), f)) + if (ranges::equal(value, "false"s, f)) return make_shared<Bool>(false); try