Bläddra i källkod

Merge pull request #2550 from signalwire/maria_move

[mod_mariadb] mariadb_dsn: Coverity 1546237 COPY_INSTEAD_OF_MOVE
Andrey Volk 3 månader sedan
förälder
incheckning
85397f1ba5
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      src/mod/databases/mod_mariadb/mariadb_dsn.cpp

+ 3 - 3
src/mod/databases/mod_mariadb/mariadb_dsn.cpp

@@ -83,11 +83,11 @@ public:
 					if ("server" == key || "host" == key) {
 					if ("server" == key || "host" == key) {
 						_host = value;
 						_host = value;
 					} else if ("uid" == key || "user" == key || "username" == key) {
 					} else if ("uid" == key || "user" == key || "username" == key) {
-						_user = value;
+						_user = std::move(value);
 					} else if ("pwd" == key || "passwd" == key || "password" == key) {
 					} else if ("pwd" == key || "passwd" == key || "password" == key) {
-						_passwd = value;
+						_passwd = std::move(value);
 					} else if ("database" == key || "db" == key) {
 					} else if ("database" == key || "db" == key) {
-						_db = value;
+						_db = std::move(value);
 					} else if ("port" == key) {
 					} else if ("port" == key) {
 						_port = std::stoi(value);
 						_port = std::stoi(value);
 					} else if ("option" == key || "options" == key) {
 					} else if ("option" == key || "options" == key) {