summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-06-09 10:58:34 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-06-09 10:58:34 +0800
commit374a42466ee4e9d0a25ef65f73b84e3c870d6f79 (patch)
tree7c9e1575cdbf8b011d56f65f16a8dcc2431bc66f /src/main.cpp
parent9f8d9fa81be1c11b50bc5ced608a3bd18a53de21 (diff)
downloadmrust-374a42466ee4e9d0a25ef65f73b84e3c870d6f79.tar.gz
Fix use of hard tabs
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ec4e9f38..1b09b79b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -258,18 +258,18 @@ int main(int argc, char *argv[])
crate_name = ::std::string(params.infile.begin() + s, params.infile.begin() + e);
for(auto& b : crate_name)
{
- if ('0' <= b && b <= '9') {
- }
- else if ('A' <= b && b <= 'Z') {
- }
- else if (b == '_') {
- }
- else if (b == '-') {
- b = '_';
- }
- else {
- // TODO: Error?
- }
+ if ('0' <= b && b <= '9') {
+ }
+ else if ('A' <= b && b <= 'Z') {
+ }
+ else if (b == '_') {
+ }
+ else if (b == '-') {
+ b = '_';
+ }
+ else {
+ // TODO: Error?
+ }
}
}
crate.m_crate_name = crate_name;
@@ -571,14 +571,14 @@ ProgramParams::ProgramParams(int argc, char *argv[])
if( arg[0] != '-' )
{
- if (this->infile == "")
- {
- this->infile = arg;
- }
- else
- {
- // TODO: Error
- }
+ if (this->infile == "")
+ {
+ this->infile = arg;
+ }
+ else
+ {
+ // TODO: Error
+ }
}
else if( arg[1] != '-' )
{
@@ -647,15 +647,15 @@ ProgramParams::ProgramParams(int argc, char *argv[])
}
this->crate_path = argv[++i];
}
- else if (strcmp(arg, "--out-dir") == 0) {
- if (i == argc - 1) {
- ::std::cerr << "Flag " << arg << " requires an argument" << ::std::endl;
- exit(1);
- }
- this->output_dir = argv[++i];
- if (this->output_dir == "") {
- // TODO: Error?
- }
+ else if (strcmp(arg, "--out-dir") == 0) {
+ if (i == argc - 1) {
+ ::std::cerr << "Flag " << arg << " requires an argument" << ::std::endl;
+ exit(1);
+ }
+ this->output_dir = argv[++i];
+ if (this->output_dir == "") {
+ // TODO: Error?
+ }
if( this->output_dir.back() != '/' )
this->output_dir += '/';
}