diff options
author | Jose <jose@zeroc.com> | 2011-05-17 00:28:49 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-05-17 00:28:49 +0200 |
commit | 8fd299eecd81950b4f44d51ab2d9d80c955c9f9e (patch) | |
tree | bdf4c3a6975cd7212d41d9e4b2ac4cac1a313cfc /cpp | |
parent | Minor fix (diff) | |
download | ice-8fd299eecd81950b4f44d51ab2d9d80c955c9f9e.tar.bz2 ice-8fd299eecd81950b4f44d51ab2d9d80c955c9f9e.tar.xz ice-8fd299eecd81950b4f44d51ab2d9d80c955c9f9e.zip |
5095 - slice2cs and StyleCop
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Slice/JavaUtil.cpp | 9 | ||||
-rwxr-xr-x | cpp/src/Slice/PythonUtil.cpp | 4 | ||||
-rwxr-xr-x | cpp/src/Slice/RubyUtil.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Slice/Util.cpp | 15 | ||||
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/src/slice2php/Main.cpp | 4 |
7 files changed, 28 insertions, 16 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 7d8b3eaf590..f0d6a514e75 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -51,7 +51,9 @@ Slice::printHeader(Output& out) ; out << header; - out << "\n// Ice version " << ICE_STRING_VERSION; + out << "//\n"; + out << "// Ice version " << ICE_STRING_VERSION << "\n"; + out << "//\n"; } void diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index c099341e8a4..8d7ab74f49b 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -130,11 +130,10 @@ Slice::JavaOutput::openClass(const string& cls, const string& prefix) { FileTracker::instance()->addFile(path); printHeader(); - + printGeneratedHeader(*this, file); if(!package.empty()) { separator(); - separator(); print("package "); print(package.c_str()); print(";"); @@ -163,8 +162,11 @@ Slice::JavaOutput::printHeader() ; print(header); - print("\n// Ice version "); + print("//\n"); + print("// Ice version "); print(ICE_STRING_VERSION); + print("\n"); + print("//\n"); } const string Slice::JavaGenerator::_getSetMetaData = "java:getset"; @@ -195,7 +197,6 @@ Slice::JavaGenerator::open(const string& absolute, const string& file) try { out->openClass(absolute, _dir); - printGeneratedHeader(*out, file); } catch(const FileException&) { diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 6d24633376b..7b62ef2970a 100755 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -2355,7 +2355,9 @@ Slice::Python::printHeader(IceUtilInternal::Output& out) ; out << header; - out << "\n# Ice version " << ICE_STRING_VERSION; + out << "#\n"; + out << "# Ice version " << ICE_STRING_VERSION << "\n"; + out << "#\n"; } bool diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index f4b6c505d1a..58b236d0e46 100755 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -1774,5 +1774,7 @@ Slice::Ruby::printHeader(IceUtilInternal::Output& out) ; out << header; - out << "\n# Ice version " << ICE_STRING_VERSION; + out << "#\n"; + out << "# Ice version " << ICE_STRING_VERSION << "\n"; + out << "#\n"; } diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 9d8cbe63902..c90f703974d 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -371,11 +371,12 @@ Slice::printGeneratedHeader(IceUtilInternal::Output& out, const string& path, co file = file.substr(pos + 1); } - out << "\n\n" << comment << " <auto-generated>"; - out << "\n" << comment; - out << "\n" << comment << " Generated from file `" << file << "'"; - out << "\n" << comment; - out << "\n" << comment << " Warning: do not edit this file."; - out << "\n" << comment; - out << "\n" << comment << " </auto-generated>\n"; + out << comment << " <auto-generated>\n"; + out << comment << "\n"; + out << comment << " Generated from file `" << file << "'" << "\n"; + out << comment << "\n"; + out << comment << " Warning: do not edit this file." << "\n"; + out << comment << "\n"; + out << comment << " </auto-generated>\n"; + out << comment << "\n"; } diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 2a610fbbd84..90d3136cbf4 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -2080,7 +2080,9 @@ Slice::Gen::printHeader() ; _out << header; - _out << "\n// Ice version " << ICE_STRING_VERSION; + _out << "//\n"; + _out << "// Ice version " << ICE_STRING_VERSION << "\n"; + _out << "//\n"; } Slice::Gen::UnitVisitor::UnitVisitor(IceUtilInternal::Output& out) diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 0f003ff89a2..eb0b254a064 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -1480,7 +1480,9 @@ printHeader(IceUtilInternal::Output& out) ; out << header; - out << "\n// Ice version " << ICE_STRING_VERSION; + out << "//\n"; + out << "// Ice version " << ICE_STRING_VERSION << "\n"; + out << "//\n"; } namespace |