Fix collections being passed by value

This commit is contained in:
Oliver Hamlet
2017-02-06 18:03:17 +00:00
parent 972298599a
commit 703317c94a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ private:
return "null";
}
static std::vector<Message> toMessages(std::vector<EditorMessage> messages) {
static std::vector<Message> toMessages(const std::vector<EditorMessage>& messages) {
std::vector<Message> list;
for (const auto& message : messages) {
+2 -2
View File
@@ -67,7 +67,7 @@ public:
}
private:
static std::vector<EditorMessage> toEditorMessages(std::vector<Message> messages, const LanguageCode language) {
static std::vector<EditorMessage> toEditorMessages(const std::vector<Message>& messages, const LanguageCode language) {
std::vector<EditorMessage> list;
for (const auto& message : messages) {
@@ -129,7 +129,7 @@ private:
return pluginNode;
}
std::string generateJsonResponse(std::vector<std::shared_ptr<const PluginInterface>> plugins) {
std::string generateJsonResponse(const std::vector<std::shared_ptr<const PluginInterface>>& plugins) {
YAML::Node gameNode;
// ID the game using its folder value.