Some const correctness in the Java pseudo core.
This commit is contained in:
@ -67,7 +67,8 @@ OOFFloatsMgr::Float::Float (OOFFloatsMgr *oofm, Widget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
void OOFFloatsMgr::Float::intoStringBuffer(StringBuffer *sb)
|
||||
void
|
||||
OOFFloatsMgr::Float::intoStringBuffer(StringBuffer *sb) const
|
||||
{
|
||||
sb->append ("{ widget = ");
|
||||
sb->appendPointer (getWidget ());
|
||||
@ -1380,6 +1381,15 @@ Widget *OOFFloatsMgr::getWidget (int i)
|
||||
return rightFloats->get(i - leftFloats->size())->getWidget ();
|
||||
}
|
||||
|
||||
const Widget *
|
||||
OOFFloatsMgr::getWidget (int i) const
|
||||
{
|
||||
if (i < leftFloats->size())
|
||||
return leftFloats->get(i)->getWidget ();
|
||||
else
|
||||
return rightFloats->get(i - leftFloats->size())->getWidget ();
|
||||
}
|
||||
|
||||
} // namespace oof
|
||||
|
||||
} // namespace dw
|
||||
|
@ -39,6 +39,7 @@ private:
|
||||
WidgetInfo (OOFFloatsMgr *oofm, core::Widget *widget);
|
||||
|
||||
inline core::Widget *getWidget () { return widget; }
|
||||
inline const core::Widget *getWidget () const { return widget; }
|
||||
};
|
||||
|
||||
class Float: public WidgetInfo
|
||||
@ -78,7 +79,7 @@ private:
|
||||
Float (OOFFloatsMgr *oofm, core::Widget *widget,
|
||||
OOFAwareWidget *generatingBlock, int externalIndex);
|
||||
|
||||
void intoStringBuffer(lout::misc::StringBuffer *sb);
|
||||
void intoStringBuffer(lout::misc::StringBuffer *sb) const override;
|
||||
|
||||
bool covers (int y, int h);
|
||||
};
|
||||
@ -281,6 +282,7 @@ public:
|
||||
|
||||
int getNumWidgets ();
|
||||
core::Widget *getWidget (int i);
|
||||
const core::Widget *getWidget (int i) const;
|
||||
};
|
||||
|
||||
} // namespace oof
|
||||
|
Reference in New Issue
Block a user