X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBullet.h;h=446f18b1e5ad5283d0af882e0e7274c800e340d5;hb=35cf7dcb2bdfdcda465b69c58465f657c77fd9d7;hp=c4c8203f8bb423c61d4c7a8f618fd2234457da33;hpb=e059c633b01937f450ff9fa873cfc6b773aa74cc;p=lyx.git diff --git a/src/Bullet.h b/src/Bullet.h index c4c8203f8b..446f18b1e5 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -47,9 +47,7 @@ public: /// int getSize() const; /// - string getText() const; - /// - string getText(); + string const & getText() const; /// char const * c_str() const; /// @@ -106,7 +104,7 @@ private: }; /// - void generateText(); + void generateText() const; /// static string bulletSize(short int); /// @@ -126,7 +124,7 @@ private: or if I can use it to generate strings (0) or have already (-1) */ - short user_text; + mutable short user_text; //NOTE: Arranging these four shorts above to be together // like this should ensure they are in a single cache line @@ -135,7 +133,7 @@ private: or one generated internally from the font, character and size settings. */ - string text; + mutable string text; }; @@ -229,13 +227,6 @@ int Bullet::getSize() const } -inline -string Bullet::getText() const -{ - return text; -} - - inline Bullet & Bullet::operator=(Bullet const & b) { @@ -257,7 +248,7 @@ Bullet & Bullet::operator=(Bullet const & b) inline char const * Bullet::c_str() const { - return this->getText().c_str(); + return getText().c_str(); }