Skip to content

Commit 1d8ca1f

Browse files
frankosterfeldjbeder
authored andcommitted
Avoid static reference to temporary
These caused issues when used in a wasm project.
1 parent 76dc671 commit 1d8ca1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/emitterutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ bool IsValidPlainScalar(const std::string& str, FlowType::value flowType,
173173
}
174174

175175
// then check until something is disallowed
176-
static const RegEx& disallowed_flow =
176+
static const RegEx disallowed_flow =
177177
Exp::EndScalarInFlow() | (Exp::BlankOrBreak() + Exp::Comment()) |
178178
Exp::NotPrintable() | Exp::Utf8_ByteOrderMark() | Exp::Break() |
179179
Exp::Tab() | Exp::Ampersand();
180-
static const RegEx& disallowed_block =
180+
static const RegEx disallowed_block =
181181
Exp::EndScalar() | (Exp::BlankOrBreak() + Exp::Comment()) |
182182
Exp::NotPrintable() | Exp::Utf8_ByteOrderMark() | Exp::Break() |
183183
Exp::Tab() | Exp::Ampersand();

0 commit comments

Comments
 (0)