ldb_cmd_execute_result.h: perform init in initialization list
Fix for: [util/ldb_cmd_execute_result.h:18]: (performance) Variable 'message_' is assigned in constructor body. Consider performing initialization in initialization list. [util/ldb_cmd_execute_result.h:23]: (performance) Variable 'message_' is assigned in constructor body. Consider performing initialization in initialization list. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
063471bf76
commit
8558457143
@ -13,15 +13,10 @@ public:
|
|||||||
EXEC_NOT_STARTED = 0, EXEC_SUCCEED = 1, EXEC_FAILED = 2,
|
EXEC_NOT_STARTED = 0, EXEC_SUCCEED = 1, EXEC_FAILED = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
LDBCommandExecuteResult() {
|
LDBCommandExecuteResult() : state_(EXEC_NOT_STARTED), message_("") {}
|
||||||
state_ = EXEC_NOT_STARTED;
|
|
||||||
message_ = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
LDBCommandExecuteResult(State state, std::string& msg) {
|
LDBCommandExecuteResult(State state, std::string& msg) :
|
||||||
state_ = state;
|
state_(state), message_(msg) {}
|
||||||
message_ = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string ToString() {
|
std::string ToString() {
|
||||||
std::string ret;
|
std::string ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user