Permalink
Browse files

Add more constness to ASObject

  • Loading branch information...
alexp-sssup committed Apr 20, 2011
1 parent d70c44b commit ce0297b6a906c61c901fc2776a32acc62f2bad0c
Showing with 6 additions and 6 deletions.
  1. +3 −3 asobject.cpp
  2. +3 −3 asobject.h
View
@@ -894,12 +894,12 @@ ASObject* ASObject::getValueAt(int index)
return ret;
}
tiny_string variables_map::getNameAt(unsigned int index)
tiny_string variables_map::getNameAt(unsigned int index) const
{
//TODO: CHECK behaviour on overridden methods
if(index<Variables.size())
{
var_iterator it=Variables.begin();
const_var_iterator it=Variables.begin();
for(unsigned int i=0;i<index;i++)
++it;
@@ -910,7 +910,7 @@ tiny_string variables_map::getNameAt(unsigned int index)
throw RunTimeException("getNameAt out of bounds");
}
unsigned int ASObject::numVariables()
unsigned int ASObject::numVariables() const
{
return Variables.size();
}
View
@@ -94,7 +94,7 @@ friend class ABCContext;
{
return Variables.size();
}
tiny_string getNameAt(unsigned int i);
tiny_string getNameAt(unsigned int i) const;
obj_var* getValueAt(unsigned int i);
~variables_map();
public:
@@ -222,8 +222,8 @@ CLASSBUILDABLE(ASObject);
Variables.setSlot(n,o);
}
void initSlot(unsigned int n, const multiname& name);
virtual unsigned int numVariables();
tiny_string getNameAt(int i)
unsigned int numVariables() const;
tiny_string getNameAt(int i) const
{
return Variables.getNameAt(i);
}

0 comments on commit ce0297b

Please sign in to comment.