:ok_hand: clean operator[]

...@@ -3669,13 +3669,7 @@ class basic_json ...@@ -3669,13 +3669,7 @@ class basic_json
#endif #endif
} }
#if JSON_DIAGNOSTICS
reference result = m_value.array->operator[](idx);
result.m_parent = this;
return result;
#else
return m_value.array->operator[](idx); return m_value.array->operator[](idx);
#endif
} }
JSON_THROW(type_error::create(305, diagnostics() + "cannot use operator[] with a numeric argument with " + std::string(type_name()))); JSON_THROW(type_error::create(305, diagnostics() + "cannot use operator[] with a numeric argument with " + std::string(type_name())));
......
...@@ -20305,13 +20305,7 @@ class basic_json ...@@ -20305,13 +20305,7 @@ class basic_json
#endif #endif
} }
#if JSON_DIAGNOSTICS
reference result = m_value.array->operator[](idx);
result.m_parent = this;
return result;
#else
return m_value.array->operator[](idx); return m_value.array->operator[](idx);
#endif
} }
JSON_THROW(type_error::create(305, diagnostics() + "cannot use operator[] with a numeric argument with " + std::string(type_name()))); JSON_THROW(type_error::create(305, diagnostics() + "cannot use operator[] with a numeric argument with " + std::string(type_name())));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment