summaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/command-line.h10
-rw-r--r--src/support/file.cpp8
-rw-r--r--src/support/file.h8
3 files changed, 13 insertions, 13 deletions
diff --git a/src/support/command-line.h b/src/support/command-line.h
index 7c3ae528f..89bf72070 100644
--- a/src/support/command-line.h
+++ b/src/support/command-line.h
@@ -34,18 +34,18 @@ namespace wasm {
class Options {
public:
- typedef std::function<void(Options *, const std::string &)> Action;
+ typedef std::function<void(Options *, const std::string& )> Action;
enum class Arguments { Zero, One, N, Optional };
bool debug;
std::map<std::string, std::string> extra;
- Options(const std::string &command, const std::string &description);
+ Options(const std::string& command, const std::string& description);
~Options();
- Options &add(const std::string &longName, const std::string &shortName,
- const std::string &description, Arguments arguments,
+ Options &add(const std::string& longName, const std::string& shortName,
+ const std::string& description, Arguments arguments,
const Action &action);
- Options &add_positional(const std::string &name, Arguments arguments,
+ Options &add_positional(const std::string& name, Arguments arguments,
const Action &action);
void parse(int argc, const char *argv[]);
diff --git a/src/support/file.cpp b/src/support/file.cpp
index bd6f2d4bd..382b94e4d 100644
--- a/src/support/file.cpp
+++ b/src/support/file.cpp
@@ -22,7 +22,7 @@
#include <limits>
template <typename T>
-T wasm::read_file(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOption debug) {
+T wasm::read_file(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug) {
if (debug == Flags::Debug) std::cerr << "Loading '" << filename << "'..." << std::endl;
std::ifstream infile;
std::ios_base::openmode flags = std::ifstream::in;
@@ -52,10 +52,10 @@ T wasm::read_file(const std::string &filename, Flags::BinaryOption binary, Flags
}
// Explicit instantiations for the explicit specializations.
-template std::string wasm::read_file<>(const std::string &, Flags::BinaryOption, Flags::DebugOption);
-template std::vector<char> wasm::read_file<>(const std::string &, Flags::BinaryOption, Flags::DebugOption);
+template std::string wasm::read_file<>(const std::string& , Flags::BinaryOption, Flags::DebugOption);
+template std::vector<char> wasm::read_file<>(const std::string& , Flags::BinaryOption, Flags::DebugOption);
-wasm::Output::Output(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOption debug)
+wasm::Output::Output(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug)
: outfile(), out([this, filename, binary, debug]() {
std::streambuf *buffer;
if (filename.size()) {
diff --git a/src/support/file.h b/src/support/file.h
index b0df8fd06..c15e3f6ce 100644
--- a/src/support/file.h
+++ b/src/support/file.h
@@ -40,15 +40,15 @@ namespace Flags {
}
template <typename T>
-T read_file(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOption debug);
+T read_file(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug);
// Declare the valid explicit specializations.
-extern template std::string read_file<>(const std::string &, Flags::BinaryOption, Flags::DebugOption);
-extern template std::vector<char> read_file<>(const std::string &, Flags::BinaryOption, Flags::DebugOption);
+extern template std::string read_file<>(const std::string& , Flags::BinaryOption, Flags::DebugOption);
+extern template std::vector<char> read_file<>(const std::string& , Flags::BinaryOption, Flags::DebugOption);
class Output {
public:
// An empty filename will open stdout instead.
- Output(const std::string &filename, Flags::BinaryOption binary, Flags::DebugOption debug);
+ Output(const std::string& filename, Flags::BinaryOption binary, Flags::DebugOption debug);
~Output() = default;
template <typename T>
std::ostream &operator<<(const T &v) {