mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
AK: Simplify JsonObject and JsonArray API a little bit
Instead of set(const JsonValue&) and set(JsonValue&&), just do set(JsonValue) and let callers move() if they want. This removes some ambiguity and the compiler is smart enough to optimize it anyway.
This commit is contained in:
parent
211e938234
commit
dc039fdc7e
2 changed files with 2 additions and 8 deletions
|
@ -68,8 +68,7 @@ public:
|
|||
const JsonValue& operator[](int index) const { return at(index); }
|
||||
|
||||
void clear() { m_values.clear(); }
|
||||
void append(const JsonValue& value) { m_values.append(value); }
|
||||
void append(JsonValue&& value) { m_values.append(move(value)); }
|
||||
void append(JsonValue value) { m_values.append(move(value)); }
|
||||
|
||||
template<typename Builder>
|
||||
typename Builder::OutputType serialized() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue