File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
postgresql/src/storages/postgres Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ DsnList SplitByHost(const Dsn& dsn) {
142142 if (!ports.empty ()) {
143143 options << " port=" << ports.front ();
144144 }
145- res.push_back (Dsn{ options.str ()} );
145+ res.emplace_back ( options.str ());
146146 } else {
147147 if (ports.size () > 1 && ports.size () != hosts.size ()) {
148148 throw InvalidDSN{DsnMaskPassword (dsn), " Invalid port options count" };
@@ -157,7 +157,7 @@ DsnList SplitByHost(const Dsn& dsn) {
157157 os << " port=" << ports[host - hosts.begin ()];
158158 }
159159 os << options.str ();
160- res.push_back (Dsn{ os.str ()} );
160+ res.emplace_back ( os.str ());
161161 }
162162 }
163163
Original file line number Diff line number Diff line change @@ -764,6 +764,7 @@ bool SentinelImpl::SetConnectionInfo(
764764
765765 if (changed) {
766766 std::vector<std::string> conn_strs;
767+ conn_strs.reserve (info_iterator.second .size ());
767768 for (const auto & conn_str : info_iterator.second )
768769 conn_strs.push_back (conn_str.Fulltext ());
769770 LOG_INFO () << " Redis state changed for client=" << client_name_
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ std::vector<redis::CommandControl> BuildTestData() {
9292 std::vector<redis::CommandControl> result;
9393
9494 // One default CC
95- result.emplace_back (redis::CommandControl{} );
95+ result.emplace_back ();
9696
9797 return result;
9898}
You can’t perform that action at this time.
0 commit comments