⚗️ add Hedley annotations

This commit is contained in:
Niels Lohmann committed 2019-06-30 22:14:02 +02:00
1 parent 9a775bcb14
commit 1720bfedd1
19 files changed
+3689 -642

No files matched your search

@@ -110,7 +110,7 @@ class serializer
// variable to hold indentation for recursive calls
const auto new_indent = current_indent + indent_step;
if (JSON_UNLIKELY(indent_string.size() < new_indent))
if (HEDLEY_UNLIKELY(indent_string.size() < new_indent))
{
indent_string.resize(indent_string.size() * 2, ' ');
}
@@ -183,7 +183,7 @@ class serializer
// variable to hold indentation for recursive calls
const auto new_indent = current_indent + indent_step;
if (JSON_UNLIKELY(indent_string.size() < new_indent))
if (HEDLEY_UNLIKELY(indent_string.size() < new_indent))
{
indent_string.resize(indent_string.size() * 2, ' ');
}
@@ -498,7 +498,7 @@ class serializer
}
// we finished processing the string
if (JSON_LIKELY(state == UTF8_ACCEPT))
if (HEDLEY_LIKELY(state == UTF8_ACCEPT))
{
// write buffer
if (bytes > 0)