refs #356 Streaming ops for QJsonObject: value in pair should be a reference, to avoid unnecessary copying and object slicing.

This commit is contained in:
Mathew Sutcliffe
2015-03-18 02:10:08 +00:00
parent a5e6b31c0f
commit 73f135fa5b
4 changed files with 22 additions and 22 deletions

View File

@@ -292,7 +292,7 @@ namespace BlackMisc
}
//! operator << for JSON
friend QJsonObject& operator<<(QJsonObject &json, const std::pair<QString, Derived> &value)
friend QJsonObject& operator<<(QJsonObject &json, const std::pair<QString, const Derived &> &value)
{
json.insert(value.first, QJsonValue(value.second.toJson()));
return json;