summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-05 05:51:09 +0000
committerMichi Henning <michi@zeroc.com>2002-07-05 05:51:09 +0000
commitfb87cc511bc90bb3ba0a07846ae77a72075a9900 (patch)
tree0d81a0723444710f564da26c55870993d61b23d4 /cpp/src/Slice/Parser.cpp
parentAdded enumerator for ConstDef::contained() (ContainedTypeConstant) to (diff)
downloadice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.tar.bz2
ice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.tar.xz
ice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.zip
Move the ICE_INT64_LITERAL macro into its own header file (Ice/Const.h).
That was cleaner than polluting the generated files with the macro definition over and over...
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 99239c6a191..0b5393ea03d 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -3392,6 +3392,24 @@ Slice::Unit::usesNonLocals() const
return false;
}
+bool
+Slice::Unit::usesConsts() const
+{
+ for(map<string, ContainedList>::const_iterator p = _contentMap.begin(); p != _contentMap.end(); ++p)
+ {
+ for(ContainedList::const_iterator q = p->second.begin(); q != p->second.end(); ++q)
+ {
+ ConstDefPtr cd = ConstDefPtr::dynamicCast(*q);
+ if(cd)
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
StringList
Slice::Unit::includeFiles() const
{