Skip to content

Commit d40069a

Browse files
pps83jkeiser
authored andcommitted
Disable deprecation warnings for VS builds
fopen/getenv are standard c++ that are not deprecated.
1 parent 73e27bd commit d40069a

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

include/simdjson.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SIMDJSON_PUSH_DISABLE_WARNINGS
1414
#if defined(_MSC_VER) && defined(__clang__)
1515
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
1616
#endif
17+
SIMDJSON_DISABLE_DEPRECATED_WARNING
1718

1819
// Public API
1920
#include "simdjson/simdjson_version.h"

include/simdjson/inline/parsedjson_iterator.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55

66
namespace simdjson {
77

8-
// VS2017 reports deprecated warnings when you define a deprecated class's methods.
9-
SIMDJSON_PUSH_DISABLE_WARNINGS
10-
SIMDJSON_DISABLE_DEPRECATED_WARNING
11-
12-
// Because of template weirdness, the actual class definition is inline in the document class
13-
148
WARN_UNUSED bool dom::parser::Iterator::is_ok() const {
159
return location < tape_length;
1610
}
@@ -477,8 +471,6 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer,
477471
return found;
478472
}
479473

480-
SIMDJSON_POP_DISABLE_WARNINGS
481-
482474
} // namespace simdjson
483475

484476
#endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H

src/simdjson.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#include "simdjson.h"
22

3+
SIMDJSON_PUSH_DISABLE_WARNINGS
34
#if defined(SIMDJSON_CLANG_VISUAL_STUDIO)
45
SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
56
#endif
6-
7+
SIMDJSON_DISABLE_DEPRECATED_WARNING
78

89
#include "error.cpp"
910
#include "implementation.cpp"
1011
#include "stage1_find_marks.cpp"
1112
#include "stage2_build_tape.cpp"
13+
14+
SIMDJSON_POP_DISABLE_WARNINGS

0 commit comments

Comments
 (0)