abetomo
null+****@clear*****
Thu Aug 31 12:24:06 JST 2017
abetomo 2017-08-31 12:24:06 +0900 (Thu, 31 Aug 2017) New Revision: 4ec3ffc1650d403243ae05e7d826f70cc9ec8018 https://github.com/nroonga/nroonga/commit/4ec3ffc1650d403243ae05e7d826f70cc9ec8018 Merged 4a52907: Merge pull request #9 from abetomo/clean_coding_style Message: Remove unnecessary else Modified files: src/nroonga.cc Modified: src/nroonga.cc (+4 -6) =================================================================== --- src/nroonga.cc 2017-08-31 12:22:41 +0900 (9427758) +++ src/nroonga.cc 2017-08-31 12:24:06 +0900 (dd29507) @@ -90,11 +90,10 @@ void Database::Close(const FunctionCallbackInfo<Value>& args) { if (db->Cleanup()) { args.GetReturnValue().Set(True(isolate)); return; - } else { - isolate->ThrowException( - Exception::Error( - String::NewFromUtf8(isolate, "Failed to close the database"))); } + isolate->ThrowException( + Exception::Error( + String::NewFromUtf8(isolate, "Failed to close the database"))); } void Database::CommandWork(uv_work_t* req) { @@ -160,9 +159,8 @@ void Database::CommandString(const FunctionCallbackInfo<Value>& args) { Exception::TypeError(String::NewFromUtf8( isolate, "Second argument must be a callback function"))); return; - } else { - callback = Local<Function>::Cast(args[1]); } + callback = Local<Function>::Cast(args[1]); } if (db->closed) { -------------- next part -------------- HTML����������������������������...Download