Skip to content

Commit

Permalink
Avoid static reference to temporary
Browse files Browse the repository at this point in the history
These caused issues when used in a wasm project.
  • Loading branch information
frankosterfeld authored and jbeder committed May 2, 2024
1 parent 76dc671 commit 1d8ca1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/emitterutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ bool IsValidPlainScalar(const std::string& str, FlowType::value flowType,
}

// then check until something is disallowed
static const RegEx& disallowed_flow =
static const RegEx disallowed_flow =
Exp::EndScalarInFlow() | (Exp::BlankOrBreak() + Exp::Comment()) |
Exp::NotPrintable() | Exp::Utf8_ByteOrderMark() | Exp::Break() |
Exp::Tab() | Exp::Ampersand();
static const RegEx& disallowed_block =
static const RegEx disallowed_block =
Exp::EndScalar() | (Exp::BlankOrBreak() + Exp::Comment()) |
Exp::NotPrintable() | Exp::Utf8_ByteOrderMark() | Exp::Break() |
Exp::Tab() | Exp::Ampersand();
Expand Down

0 comments on commit 1d8ca1f

Please sign in to comment.