build: fixed missing include and clang warnings

This commit is contained in:
Eberhard Graether
2014-07-02 21:39:39 +02:00
parent 400e2629d2
commit e63106b13b
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -4,12 +4,12 @@
#include <memory>
#include <string>
#include "component/Component.h"
#include "component/view/ViewLayout.h"
#include "utility/math/Vector2.h"
class GuiWidgetWrapper;
class ViewLayout;
class Component;
class View
{
+4 -4
View File
@@ -131,18 +131,18 @@ std::vector<std::string> TextAccess::readFile(const std::string& filePath)
std::vector<std::string> TextAccess::splitStringByLines(const std::string& text)
{
std::vector<std::string> result;
int prevIndex = 0;
int index = text.find("\n");
size_t prevIndex = 0;
size_t index = text.find("\n");
while (index != std::string::npos)
{
result.push_back(text.substr(prevIndex, index - prevIndex) + "\n");
prevIndex = index+1;
prevIndex = index + 1;
index = text.find("\n", prevIndex);
}
if (prevIndex < text.length()-1)
if (prevIndex < text.length() - 1)
{
result.push_back(text.substr(prevIndex));
}