diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /cpp/src/Slice/DotNetNames.cpp | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'cpp/src/Slice/DotNetNames.cpp')
-rwxr-xr-x | cpp/src/Slice/DotNetNames.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/cpp/src/Slice/DotNetNames.cpp b/cpp/src/Slice/DotNetNames.cpp index 5588f9a20c9..f55f6470454 100755 --- a/cpp/src/Slice/DotNetNames.cpp +++ b/cpp/src/Slice/DotNetNames.cpp @@ -25,81 +25,81 @@ struct Node }; static const char* ObjectNames[] = - { - "Equals", "Finalize", "GetHashCode", "GetType", - "MemberwiseClone", "ReferenceEquals", "ToString", 0 - }; + { + "Equals", "Finalize", "GetHashCode", "GetType", + "MemberwiseClone", "ReferenceEquals", "ToString", 0 + }; static const Node* ObjectParents[] = - { - 0 - }; + { + 0 + }; static const Node ObjectNode = - { - ObjectNames, &ObjectParents[0] - }; + { + ObjectNames, &ObjectParents[0] + }; static const char* ICloneableNames[] = - { - "Clone", 0 - }; + { + "Clone", 0 + }; static const Node* ICloneableParents[] = - { - &ObjectNode, 0 - }; + { + &ObjectNode, 0 + }; static const Node ICloneableNode = - { - ICloneableNames, &ICloneableParents[0] - }; + { + ICloneableNames, &ICloneableParents[0] + }; static const char* ExceptionNames[] = - { - "GetBaseException", "GetObjectData", "HelpLink", "HResult", "InnerException", - "Message", "Source", "StackTrace", "TargetSite", 0 - }; + { + "GetBaseException", "GetObjectData", "HelpLink", "HResult", "InnerException", + "Message", "Source", "StackTrace", "TargetSite", 0 + }; static const Node* ExceptionParents[] = - { - &ObjectNode, 0 - }; + { + &ObjectNode, 0 + }; static const Node ExceptionNode = - { - ExceptionNames, &ExceptionParents[0] - }; + { + ExceptionNames, &ExceptionParents[0] + }; static const char* ApplicationExceptionNames[] = - { - 0 - }; + { + 0 + }; static const Node* ApplicationExceptionParents[] = - { - &ExceptionNode, 0 - }; + { + &ExceptionNode, 0 + }; static const Node ApplicationExceptionNode = - { - ApplicationExceptionNames, &ApplicationExceptionParents[0] - }; + { + ApplicationExceptionNames, &ApplicationExceptionParents[0] + }; // // Must be kept in same order as definition of BaseType in header file! // static const Node* nodes[] = - { - &ObjectNode, &ICloneableNode, &ExceptionNode, &ApplicationExceptionNode - }; + { + &ObjectNode, &ICloneableNode, &ExceptionNode, &ApplicationExceptionNode + }; static bool ciEquals(const string& s, const char* p) { if(s.size() != strlen(p)) { - return false; + return false; } string::const_iterator i = s.begin(); while(i != s.end()) { - if(tolower(*i++) != tolower(*p++)) - { - return false; - } + if(tolower(*i++) != tolower(*p++)) + { + return false; + } } return true; } @@ -113,21 +113,21 @@ mangle(const string& s, const Node* np, string& newName) const char** namep = np->names; while(*namep) { - if(ciEquals(s, *namep)) - { - newName = manglePrefix + s + mangleSuffix; - return true; - } - ++namep; + if(ciEquals(s, *namep)) + { + newName = manglePrefix + s + mangleSuffix; + return true; + } + ++namep; } const Node** parentp = np->parents; while(*parentp) { - if(mangle(s, *parentp, newName)) - { - return true; - } - ++parentp; + if(mangle(s, *parentp, newName)) + { + return true; + } + ++parentp; } return false; } @@ -141,18 +141,18 @@ Slice::DotNet::mangleName(const string& s, int baseTypes) { if(baseTypes == 0) { - return s; + return s; } string newName; for(unsigned int mask = 1, i=0; mask < END; mask <<= 1, ++i) { - if(baseTypes & mask) - { - if(mangle(s, nodes[i], newName)) - { - return newName; - } - } + if(baseTypes & mask) + { + if(mangle(s, nodes[i], newName)) + { + return newName; + } + } } return s; } |