diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-05-02 15:09:23 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-05-02 15:09:23 -0400 |
commit | ee89756a2b90eebe9e87d11e6103a18cf1a0ed9d (patch) | |
tree | 3bb3d9129bc7cc043a4d7622402fe0931c3428c9 | |
parent | Removed trailing whitespace generated by slice2objc (diff) | |
download | ice-ee89756a2b90eebe9e87d11e6103a18cf1a0ed9d.tar.bz2 ice-ee89756a2b90eebe9e87d11e6103a18cf1a0ed9d.tar.xz ice-ee89756a2b90eebe9e87d11e6103a18cf1a0ed9d.zip |
Removed trailing whitespace generated by slice2js
-rw-r--r-- | cpp/src/slice2js/Gen.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp index fe065f66f36..7665cb7167f 100644 --- a/cpp/src/slice2js/Gen.cpp +++ b/cpp/src/slice2js/Gen.cpp @@ -305,7 +305,14 @@ Slice::JsVisitor::writeDocComment(const ContainedPtr& p, const string& deprecate _out << nl << " * " << extraParam; doneExtraParam = true; } - _out << nl << " * " << *i; + if((*i).empty()) + { + _out << nl << " *"; + } + else + { + _out << nl << " * " << *i; + } } if(!doneExtraParam && !extraParam.empty()) @@ -801,7 +808,7 @@ Slice::Gen::RequireVisitor::writeRequires(const UnitPtr& p) } else { - _out << nl << "const " << i->first << " = _ModuleRegistry.require(module, "; + _out << nl << "const " << i->first << " = _ModuleRegistry.require(module,"; _out << nl << "["; _out.inc(); for(list<string>::const_iterator j = i->second.begin(); j != i->second.end();) @@ -819,7 +826,7 @@ Slice::Gen::RequireVisitor::writeRequires(const UnitPtr& p) } _out.dec(); _out << nl << "])." << i->first << ";"; - _out << nl; + _out << sp; } seenModules.push_back(i->first); } @@ -1112,7 +1119,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) (base->isInterface() ? base->name() : base->name() + "Disp"); if(++q != bases.end()) { - _out << ", "; + _out << ","; } } else @@ -1160,7 +1167,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << getLocalScope(base->scope()) << "." << base->name() << "Prx"; if(++q != bases.end()) { - _out << ", "; + _out << ","; } } else @@ -1341,7 +1348,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) } _out << ']'; } - _out << ", "; + _out << ","; // // User exceptions. @@ -1354,7 +1361,11 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p) #else throws.sort(Slice::DerivedToBaseCompare()); #endif - if(!throws.empty()) + if(throws.empty()) + { + _out << " "; + } + else { _out << nl << '['; _out.inc(); |