Some const correctness in the Java pseudo core.
This commit is contained in:
@ -75,17 +75,13 @@ Object *Object::clone()
|
||||
/**
|
||||
* \brief Use object::Object::intoStringBuffer to return a textual
|
||||
* representation of the object.
|
||||
*
|
||||
* The caller does not have to free the memory, object::Object is responsible
|
||||
* for this.
|
||||
*/
|
||||
const char *Object::toString()
|
||||
std::string
|
||||
Object::toString() const
|
||||
{
|
||||
/** \todo garbage! */
|
||||
misc::StringBuffer sb;
|
||||
intoStringBuffer(&sb);
|
||||
char *s = dStrdup(sb.getChars());
|
||||
return s;
|
||||
return sb.getChars();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,7 +89,8 @@ const char *Object::toString()
|
||||
*
|
||||
* This is used by object::Object::toString.
|
||||
*/
|
||||
void Object::intoStringBuffer(misc::StringBuffer *sb)
|
||||
void
|
||||
Object::intoStringBuffer(misc::StringBuffer *sb) const
|
||||
{
|
||||
sb->append("<not further specified object ");
|
||||
sb->appendPointer(this);
|
||||
|
||||
Reference in New Issue
Block a user