Skip to content

Commit acfab4e

Browse files
Modify variable name to avoid ODR violations with LTO (#48)
1 parent f18f03f commit acfab4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hjson_parsenumber.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace Hjson {
1414

1515

16-
struct Parser {
16+
struct NumberParser {
1717
const unsigned char *data;
1818
size_t dataSize;
1919
int indexNext;
@@ -72,7 +72,7 @@ static bool _parseInt(std::int64_t *pNumber, const char *pCh, size_t nCh) {
7272
}
7373

7474

75-
static bool _next(Parser *p) {
75+
static bool _next(NumberParser *p) {
7676
// get the next character.
7777
if (p->indexNext < p->dataSize) {
7878
p->ch = p->data[p->indexNext++];
@@ -91,7 +91,7 @@ static bool _next(Parser *p) {
9191

9292
// Parse a number value. The parameter "text" must be zero terminated.
9393
bool tryParseNumber(Value *pValue, const char *text, size_t textSize, bool stopAtNext) {
94-
Parser p = {
94+
NumberParser p = {
9595
(const unsigned char*) text,
9696
textSize,
9797
0,

0 commit comments

Comments
 (0)