1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

some cleanup

This commit is contained in:
Marc Zinnschlag 2012-01-17 13:53:27 +01:00
parent 484b8a95f0
commit f5a82931b6

View file

@ -4,11 +4,14 @@
#include "../mwworld/environment.hpp" #include "../mwworld/environment.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
struct book namespace
{ {
int endLine; struct book
std::list<std::string> pages; {
}; int endLine;
std::list<std::string> pages;
};
}
book formatText(std::string text,book mBook,int maxLine, int lineSize) 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 //TODO:finnish this
break; break;
} }
if(firstSpace + cLineSize <= lineSize) if(static_cast<int> (firstSpace) + cLineSize <= lineSize)
{ {
cLineSize = firstSpace + cLineSize; cLineSize = firstSpace + cLineSize;
cString = cString + cText.substr(0,firstSpace +1); 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; mBook.endLine = cLine;
return mBook; return mBook;
//std::string //std::string
} }
@ -187,4 +190,4 @@ void MWGui::JournalWindow::notifyPrevPage(MyGUI::WidgetPtr _sender)
displayLeftText(leftPages[mPageNumber]); displayLeftText(leftPages[mPageNumber]);
displayRightText(rightPages[mPageNumber]); displayRightText(rightPages[mPageNumber]);
} }
} }