mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 09:27:13 +00:00
Merge branch 'json-view/13-view-dump' into json-view/16-view-simd
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -836,7 +836,10 @@ indent_done:
|
|||||||
|
|
||||||
NLOHMANN_VIEW_ALWAYS_INLINE void open(value_t k)
|
NLOHMANN_VIEW_ALWAYS_INLINE void open(value_t k)
|
||||||
{
|
{
|
||||||
const auto idx = static_cast<std::uint32_t>(emit(k, 0, 0, static_cast<std::size_t>(p - b), 0) - base);
|
// (base is read after emit(), which moves the node array when it
|
||||||
|
// grows; in one expression the order of the two is unspecified)
|
||||||
|
const node* const n = emit(k, 0, 0, static_cast<std::size_t>(p - b), 0);
|
||||||
|
const auto idx = static_cast<std::uint32_t>(n - base);
|
||||||
if (depth != 0)
|
if (depth != 0)
|
||||||
{
|
{
|
||||||
if (NLOHMANN_VIEW_LIKELY(depth <= 64))
|
if (NLOHMANN_VIEW_LIKELY(depth <= 64))
|
||||||
|
|||||||
@@ -1845,7 +1845,10 @@ indent_done:
|
|||||||
|
|
||||||
NLOHMANN_VIEW_ALWAYS_INLINE void open(value_t k)
|
NLOHMANN_VIEW_ALWAYS_INLINE void open(value_t k)
|
||||||
{
|
{
|
||||||
const auto idx = static_cast<std::uint32_t>(emit(k, 0, 0, static_cast<std::size_t>(p - b), 0) - base);
|
// (base is read after emit(), which moves the node array when it
|
||||||
|
// grows; in one expression the order of the two is unspecified)
|
||||||
|
const node* const n = emit(k, 0, 0, static_cast<std::size_t>(p - b), 0);
|
||||||
|
const auto idx = static_cast<std::uint32_t>(n - base);
|
||||||
if (depth != 0)
|
if (depth != 0)
|
||||||
{
|
{
|
||||||
if (NLOHMANN_VIEW_LIKELY(depth <= 64))
|
if (NLOHMANN_VIEW_LIKELY(depth <= 64))
|
||||||
|
|||||||
Reference in new issue
Block a user