Revert "chore: reformat code C++ to make the linter happy (#18687)" (#18881)

This reverts commit 38cca77346.
This commit is contained in:
Alexey Kuzmin
2019-06-20 16:54:11 +02:00
committed by Shelley Vohr
parent 401f6641c8
commit b3c44d1fe6

View File

@@ -100,14 +100,13 @@ namespace {
void stop_and_close_uv_loop(uv_loop_t* loop) {
// Close any active handles
uv_stop(loop);
uv_walk(
loop,
[](uv_handle_t* handle, void*) {
if (!uv_is_closing(handle)) {
uv_close(handle, nullptr);
}
},
nullptr);
uv_walk(loop,
[](uv_handle_t* handle, void*) {
if (!uv_is_closing(handle)) {
uv_close(handle, nullptr);
}
},
nullptr);
// Run the loop to let it finish all the closing handles
// NB: after uv_stop(), uv_run(UV_RUN_DEFAULT) returns 0 when that's done
@@ -132,7 +131,7 @@ namespace {
// is not modified.
std::unique_ptr<const char* []> StringVectorToArgArray(
const std::vector<std::string>& vector) {
std::unique_ptr<const char*[]> array(new const char*[vector.size()]);
std::unique_ptr<const char* []> array(new const char*[vector.size()]);
for (size_t i = 0; i < vector.size(); ++i) {
array[i] = vector[i].c_str();
}
@@ -326,7 +325,7 @@ node::Environment* NodeBindings::CreateEnvironment(
.Append(FILE_PATH_LITERAL("init.js"));
args.insert(args.begin() + 1, script_path.AsUTF8Unsafe());
std::unique_ptr<const char*[]> c_argv = StringVectorToArgArray(args);
std::unique_ptr<const char* []> c_argv = StringVectorToArgArray(args);
node::Environment* env = node::CreateEnvironment(
node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform),
context, args.size(), c_argv.get(), 0, nullptr);