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>
main
Danny Al-Gaaf 10 years ago
parent 063471bf76
commit 8558457143
  1. 11
      util/ldb_cmd_execute_result.h

@ -13,15 +13,10 @@ public:
EXEC_NOT_STARTED = 0, EXEC_SUCCEED = 1, EXEC_FAILED = 2,
};
LDBCommandExecuteResult() {
state_ = EXEC_NOT_STARTED;
message_ = "";
}
LDBCommandExecuteResult() : state_(EXEC_NOT_STARTED), message_("") {}
LDBCommandExecuteResult(State state, std::string& msg) {
state_ = state;
message_ = msg;
}
LDBCommandExecuteResult(State state, std::string& msg) :
state_(state), message_(msg) {}
std::string ToString() {
std::string ret;

Loading…
Cancel
Save