Skip to content

Commit 56c474a

Browse files
committed
constexpr + noexxcept in gpre/parse
1 parent 6d56ec8 commit 56c474a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gpre/parse.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ struct tok
5151
gpre_sym* tok_charset; // Character set of token
5252
};
5353

54-
const size_t TOK_LEN = sizeof(tok);
54+
inline constexpr size_t TOK_LEN = sizeof(tok);
5555

5656
// CVC: This function doesn't unescape embedded quotes.
57-
inline void strip_quotes(tok& tkn)
57+
inline void strip_quotes(tok& tkn) noexcept
5858
{
5959
int ij;
6060
for (ij = 1; ij < tkn.tok_length - 1; ij++)
@@ -64,7 +64,7 @@ inline void strip_quotes(tok& tkn)
6464
tkn.tok_length = ij;
6565
}
6666

67-
inline bool isQuoted(const int typ)
67+
inline bool isQuoted(const int typ) noexcept
6868
{
6969
return (typ == tok_sglquoted || typ == tok_dblquoted);
7070
}

0 commit comments

Comments
 (0)