mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Make entire implementation namespaces anonymous
This commit is contained in:
@@ -6,9 +6,8 @@
|
||||
// Stage 1
|
||||
//
|
||||
|
||||
namespace simdjson {
|
||||
namespace SIMDJSON_IMPLEMENTATION {
|
||||
namespace {
|
||||
namespace SIMDJSON_IMPLEMENTATION {
|
||||
|
||||
using namespace simd;
|
||||
|
||||
@@ -70,9 +69,8 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
|
||||
return simd8<int8_t>(is_third_byte | is_fourth_byte) > int8_t(0);
|
||||
}
|
||||
|
||||
} // namespace {
|
||||
} // namespace SIMDJSON_IMPLEMENTATION
|
||||
} // namespace simdjson
|
||||
} // namespace {
|
||||
|
||||
#include "generic/stage1/utf8_lookup4_algorithm.h"
|
||||
#include "generic/stage1/json_structural_indexer.h"
|
||||
@@ -88,10 +86,9 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
|
||||
//
|
||||
// Implementation-specific overrides
|
||||
//
|
||||
namespace simdjson {
|
||||
namespace SIMDJSON_IMPLEMENTATION {
|
||||
|
||||
namespace {
|
||||
namespace SIMDJSON_IMPLEMENTATION {
|
||||
namespace stage1 {
|
||||
|
||||
really_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
|
||||
@@ -100,7 +97,6 @@ really_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
|
||||
}
|
||||
|
||||
} // namespace stage1
|
||||
} // namespace {
|
||||
|
||||
WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept {
|
||||
return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len);
|
||||
@@ -113,7 +109,7 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
|
||||
}
|
||||
|
||||
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
|
||||
return simdjson::westmere::stage1::generic_validate_utf8(buf,len);
|
||||
return westmere::stage1::generic_validate_utf8(buf,len);
|
||||
}
|
||||
|
||||
WARN_UNUSED error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept {
|
||||
@@ -140,6 +136,6 @@ WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *_buf, siz
|
||||
}
|
||||
|
||||
} // namespace SIMDJSON_IMPLEMENTATION
|
||||
} // namespace simdjson
|
||||
} // namespace {
|
||||
|
||||
#include "westmere/end_implementation.h"
|
||||
|
||||
Reference in New Issue
Block a user