Skip to content

Commit 48299da

Browse files
committed
Use const ref instead of string copy
1 parent 30a5cd2 commit 48299da

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/properties.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ bool properties_t::get_bool(std::string const &property,
8383
property);
8484
}
8585

86-
void properties_t::set_string(std::string property, std::string value)
86+
void properties_t::set_string(std::string const &property,
87+
std::string const &value)
8788
{
8889
m_properties[property] = value;
8990
m_to_update[property] = value;

src/properties.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class properties_t
5454
* \param property Name of the property
5555
* \param value Value of the property
5656
*/
57-
void set_string(std::string property, std::string value);
57+
void set_string(std::string const &property, std::string const &value);
5858

5959
/**
6060
* Set property to integer value. The integer will be converted to a string

0 commit comments

Comments
 (0)