From f5a82931b6d22a650ba885609d5861101b0fd6e0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 17 Jan 2012 13:53:27 +0100 Subject: [PATCH] some cleanup --- apps/openmw/mwgui/journalwindow.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index 89ec6998e..457a07582 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -4,11 +4,14 @@ #include "../mwworld/environment.hpp" #include "../mwworld/world.hpp" -struct book +namespace { - int endLine; - std::list pages; -}; + struct book + { + int endLine; + std::list pages; + }; +} book formatText(std::string text,book mBook,int maxLine, int lineSize) { @@ -44,7 +47,7 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize) //TODO:finnish this break; } - if(firstSpace + cLineSize <= lineSize) + if(static_cast (firstSpace) + cLineSize <= lineSize) { cLineSize = firstSpace + cLineSize; cString = cString + cText.substr(0,firstSpace +1); @@ -70,7 +73,7 @@ book formatText(std::string text,book mBook,int maxLine, int lineSize) } mBook.endLine = cLine; return mBook; - //std::string + //std::string } @@ -187,4 +190,4 @@ void MWGui::JournalWindow::notifyPrevPage(MyGUI::WidgetPtr _sender) displayLeftText(leftPages[mPageNumber]); displayRightText(rightPages[mPageNumber]); } -} \ No newline at end of file +}