[core] fix various errors reported by clang-tidy

This commit is contained in:
Konstantin Käfer
2015-12-01 17:16:37 +01:00
parent dc620f48de
commit 6feb89cbbc
2 changed files with 5 additions and 4 deletions

View File

@@ -112,9 +112,10 @@ struct ColorMask {
MBGL_CHECK_ERROR(glColorMask(value.r, value.g, value.b, value.a));
}
inline static Type Get() {
GLfloat floats[4];
MBGL_CHECK_ERROR(glGetFloatv(GL_COLOR_WRITEMASK, floats));
return { floats[0], floats[1], floats[2], floats[3] };
GLboolean bools[4];
MBGL_CHECK_ERROR(glGetBooleanv(GL_COLOR_WRITEMASK, bools));
return { static_cast<bool>(bools[0]), static_cast<bool>(bools[1]),
static_cast<bool>(bools[2]), static_cast<bool>(bools[3]) };
}
};

View File

@@ -20,7 +20,7 @@ typedef std::vector<Message> Messages;
class StyleParserTest : public ::testing::TestWithParam<std::string> {};
TEST_P(StyleParserTest, ParseStyle) {
const std::string &base = "test/fixtures/style_parser/" + GetParam();
const std::string base = std::string("test/fixtures/style_parser/") + GetParam();
rapidjson::Document infoDoc;
infoDoc.Parse<0>(util::read_file(base + ".info.json").c_str());