summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Util.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-10-23 16:19:38 -0400
committerBernard Normier <bernard@zeroc.com>2012-10-23 16:19:38 -0400
commitada25bad3511a359eb28cf48f018d6a42e166f10 (patch)
tree430749f887a1c6f708c2d4a23b3e3ec4ef18ef2c /cpp/src/IceGrid/Util.cpp
parentRuby 1.8 fix (diff)
downloadice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.bz2
ice-ada25bad3511a359eb28cf48f018d6a42e166f10.tar.xz
ice-ada25bad3511a359eb28cf48f018d6a42e166f10.zip
Fixed ICE-4855: expand tabs to space (8) for .php, .cpp, .h, .java and .cs files
Diffstat (limited to 'cpp/src/IceGrid/Util.cpp')
-rw-r--r--cpp/src/IceGrid/Util.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp
index cc13cd3804e..2349f0ee503 100644
--- a/cpp/src/IceGrid/Util.cpp
+++ b/cpp/src/IceGrid/Util.cpp
@@ -111,64 +111,64 @@ IceGrid::escapeProperty(const string& s, bool escapeEqual)
switch(c)
{
case ' ':
- {
- //
- // We only escape the space character when it's at the beginning
- // or at the end of the string
- //
- if(i < firstChar || i > lastChar)
- {
- if(previousCharIsEscape)
- {
- result.push_back('\\'); // escape the previous char, by adding another escape.
- }
+ {
+ //
+ // We only escape the space character when it's at the beginning
+ // or at the end of the string
+ //
+ if(i < firstChar || i > lastChar)
+ {
+ if(previousCharIsEscape)
+ {
+ result.push_back('\\'); // escape the previous char, by adding another escape.
+ }
- result.push_back('\\');
- }
- result.push_back(c);
- previousCharIsEscape = false;
- break;
- }
+ result.push_back('\\');
+ }
+ result.push_back(c);
+ previousCharIsEscape = false;
+ break;
+ }
- case '\\':
+ case '\\':
case '#':
case '=':
- {
- if(c == '=' && !escapeEqual)
- {
- previousCharIsEscape = false;
- }
- else
- {
- //
- // We only escape the \ character when it is followed by a
- // character that we escape, e.g. \# is encoded as \\\#, not \#
- // and \\server is encoded as \\\server.
- //
- if(previousCharIsEscape)
- {
- result.push_back('\\'); // escape the previous char, by adding another escape.
- }
- if(c == '\\')
- {
- previousCharIsEscape = true; // deferring the potential escaping to the next loop
- }
- else
- {
- result.push_back('\\');
- previousCharIsEscape = false;
- }
- }
- result.push_back(c);
- break;
- }
+ {
+ if(c == '=' && !escapeEqual)
+ {
+ previousCharIsEscape = false;
+ }
+ else
+ {
+ //
+ // We only escape the \ character when it is followed by a
+ // character that we escape, e.g. \# is encoded as \\\#, not \#
+ // and \\server is encoded as \\\server.
+ //
+ if(previousCharIsEscape)
+ {
+ result.push_back('\\'); // escape the previous char, by adding another escape.
+ }
+ if(c == '\\')
+ {
+ previousCharIsEscape = true; // deferring the potential escaping to the next loop
+ }
+ else
+ {
+ result.push_back('\\');
+ previousCharIsEscape = false;
+ }
+ }
+ result.push_back(c);
+ break;
+ }
default:
- {
- result.push_back(c);
- previousCharIsEscape = false;
- break;
- }
+ {
+ result.push_back(c);
+ previousCharIsEscape = false;
+ break;
+ }
}
}
return result;