Fix const

This commit is contained in:
David Rowe 2014-11-13 11:34:40 -08:00
parent 8d4cecda62
commit 493455fdac
2 changed files with 2 additions and 2 deletions

View file

@ -358,7 +358,7 @@ bool Overlays::isLoaded(unsigned int id) {
return overlay->isLoaded(); return overlay->isLoaded();
} }
const float Overlays::textWidth(unsigned int id, const QString& text) { float Overlays::textWidth(unsigned int id, const QString& text) const {
Overlay* thisOverlay = _overlays2D[id]; Overlay* thisOverlay = _overlays2D[id];
if (thisOverlay) { if (thisOverlay) {
if (typeid(*thisOverlay) == typeid(TextOverlay)) { if (typeid(*thisOverlay) == typeid(TextOverlay)) {

View file

@ -67,7 +67,7 @@ public slots:
/// returns the width of the given text in the specified overlay if it is a text overlay: in pixels if it is a 2D text /// returns the width of the given text in the specified overlay if it is a text overlay: in pixels if it is a 2D text
/// overlay; in meters if it is a 3D text overlay /// overlay; in meters if it is a 3D text overlay
const float textWidth(unsigned int id, const QString& text); float textWidth(unsigned int id, const QString& text) const;
private: private:
QMap<unsigned int, Overlay*> _overlays2D; QMap<unsigned int, Overlay*> _overlays2D;