Fix build

This commit is contained in:
Ted John 2018-01-21 12:41:42 +00:00
parent cebe13984f
commit 02d783a993
3 changed files with 4 additions and 3 deletions

View File

@ -90,7 +90,7 @@ std::string OpenGLShader::ReadSourceCode(const std::string &path)
}
auto fileData = std::string((size_t)fileLength + 1, '\0');
fs.Read(fileData.data(), fileLength);
fs.Read((void *)fileData.data(), fileLength);
return fileData;
}

View File

@ -240,7 +240,8 @@ static bool window_changelog_read_file()
return false;
}
auto * start = _changelogText.data();
// Non-const cast required until C++17 is enabled
auto * start = (char *)_changelogText.data();
if (_changelogText.size() >= 3 && utf8_is_bom(start))
{
start += 3;

View File

@ -1201,7 +1201,7 @@ static void window_editor_object_selection_set_pressed_tab(rct_window *w)
static sint32 get_object_from_object_selection(uint8 object_type, sint32 y)
{
sint32 listItemIndex = y / 12;
if (listItemIndex < 0 || listItemIndex >= _listItems.size())
if (listItemIndex < 0 || (size_t)listItemIndex >= _listItems.size())
return -1;
return listItemIndex;