We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63a1abe commit 2fb9949Copy full SHA for 2fb9949
checktestdata.cc
@@ -159,7 +159,7 @@ class Reader : public Command {
159
160
private:
161
Expression string_;
162
- const void* last_string_value_ = nullptr;
+ Value::string last_string_value_;
163
std::optional<RE2> regex_;
164
165
void readString(std::string_view& in) {
@@ -174,8 +174,8 @@ class Reader : public Command {
174
175
void readRegex(std::string_view& in) {
176
const auto& s = std::get<Value::string>(string_.eval().value_);
177
- if (&s != last_string_value_) {
178
- last_string_value_ = &s;
+ if (!regex_ || s != last_string_value_) {
+ last_string_value_ = s;
179
regex_.emplace(s);
180
}
181
const char* before = in.data();
0 commit comments