Skip to content

Commit

Permalink
ldb_cmd_execute_result.h: perform init in initialization list
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dalgaaf committed Sep 30, 2014
1 parent 063471b commit 8558457
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions util/ldb_cmd_execute_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ class LDBCommandExecuteResult {
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;
Expand Down

0 comments on commit 8558457

Please sign in to comment.