mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user