summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-03-31 15:20:57 -0700
committerGitHub <noreply@github.com>2023-03-31 15:20:57 -0700
commit79c94ea62a665beccf12a7b93b23599ae04937dd (patch)
tree16467120420b3b6f1ce5682af62346db391fa1a1 /src/tools
parentc2c8062bfe6bf65a4a41a617241a8f32b50387e6 (diff)
downloadbinaryen-79c94ea62a665beccf12a7b93b23599ae04937dd.tar.gz
binaryen-79c94ea62a665beccf12a7b93b23599ae04937dd.tar.bz2
binaryen-79c94ea62a665beccf12a7b93b23599ae04937dd.zip
[NFC] Remove our bespoke `make_unique` implementation (#5613)
This code predates our adoption of C++14 and can now be removed in favor of `std::make_unique`, which should be more efficient.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/wasm-reduce.cpp4
-rw-r--r--src/tools/wasm2js.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp
index 078eca648..f3f252477 100644
--- a/src/tools/wasm-reduce.cpp
+++ b/src/tools/wasm-reduce.cpp
@@ -352,7 +352,7 @@ struct Reducer
}
void loadWorking() {
- module = make_unique<Module>();
+ module = std::make_unique<Module>();
ModuleReader reader;
try {
reader.read(working, *module);
@@ -371,7 +371,7 @@ struct Reducer
// Apply features the user passed on the commandline.
toolOptions.applyFeatures(*module);
- builder = make_unique<Builder>(*module);
+ builder = std::make_unique<Builder>(*module);
setModule(module.get());
}
diff --git a/src/tools/wasm2js.cpp b/src/tools/wasm2js.cpp
index 79eee56a0..1c2606b6a 100644
--- a/src/tools/wasm2js.cpp
+++ b/src/tools/wasm2js.cpp
@@ -981,14 +981,14 @@ int main(int argc, const char* argv[]) {
if (options.debug) {
std::cerr << "s-parsing..." << std::endl;
}
- sexprParser = make_unique<SExpressionParser>(input.data());
+ sexprParser = std::make_unique<SExpressionParser>(input.data());
root = sexprParser->root;
if (options.debug) {
std::cerr << "w-parsing..." << std::endl;
}
- sexprBuilder =
- make_unique<SExpressionWasmBuilder>(wasm, *(*root)[0], options.profile);
+ sexprBuilder = std::make_unique<SExpressionWasmBuilder>(
+ wasm, *(*root)[0], options.profile);
}
} catch (ParseException& p) {
p.dump(std::cerr);