From 5560a44ff5beea4fc2b88a589a3f915b9d0555d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 26 Apr 2013 15:06:13 +0300 Subject: fix code style. --- src/gui/sdlfont.cpp | 14 ++++++++------ src/gui/sdlfont.h | 4 ++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index 4e71de061..0b4f57baa 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -59,11 +59,11 @@ SDLTextChunkSmall::SDLTextChunkSmall(const std::string &text0, { } -SDLTextChunkSmall::SDLTextChunkSmall(const SDLTextChunkSmall &old) +SDLTextChunkSmall::SDLTextChunkSmall(const SDLTextChunkSmall &old) : + text(old.text), + color(old.color), + color2(old.color2) { - text = old.text; - color = old.color; - color2 = old.color2; } bool SDLTextChunkSmall::operator==(const SDLTextChunkSmall &chunk) const @@ -96,7 +96,7 @@ bool SDLTextChunkSmall::operator<(const SDLTextChunkSmall &chunk) const } SDLTextChunk::SDLTextChunk(const std::string &text0, const gcn::Color &color0, - const gcn::Color &color1) : + const gcn::Color &color1) : img(nullptr), text(text0), color(color0), @@ -209,7 +209,9 @@ void SDLTextChunk::generate(TTF_Font *const font, const float alpha) TextChunkList::TextChunkList() : start(nullptr), end(nullptr), - size(0) + size(0), + search(), + searchWidth() { } diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h index 9e439279f..f7fa15d6b 100644 --- a/src/gui/sdlfont.h +++ b/src/gui/sdlfont.h @@ -65,6 +65,8 @@ class SDLTextChunk final SDLTextChunk(const std::string &text0, const gcn::Color &color0, const gcn::Color &color1); + A_DELETE_COPY(SDLTextChunk) + ~SDLTextChunk(); bool operator==(const SDLTextChunk &chunk) const; @@ -85,6 +87,8 @@ class TextChunkList final public: TextChunkList(); + A_DELETE_COPY(TextChunkList) + void insertFirst(SDLTextChunk *const item); void moveToFirst(SDLTextChunk *item); -- cgit v1.2.3-70-g09d2