summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-12-01 17:16:37 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-03 15:38:36 +0100
commit6feb89cbbc50d31557c3d74d3a7ca97b474a7507 (patch)
tree49cc7fffc18e3f4f4b556a626b5d3391a5f8b414
parentdc620f48de48d500298044d8da0ba946b3b0c566 (diff)
downloadqtlocation-mapboxgl-6feb89cbbc50d31557c3d74d3a7ca97b474a7507.tar.gz
[core] fix various errors reported by clang-tidy
-rw-r--r--src/mbgl/renderer/gl_config.hpp7
-rw-r--r--test/miscellaneous/style_parser.cpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/renderer/gl_config.hpp b/src/mbgl/renderer/gl_config.hpp
index b110f071fd..55590cf665 100644
--- a/src/mbgl/renderer/gl_config.hpp
+++ b/src/mbgl/renderer/gl_config.hpp
@@ -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]) };
}
};
diff --git a/test/miscellaneous/style_parser.cpp b/test/miscellaneous/style_parser.cpp
index 7a38ba054d..ed9a0462b5 100644
--- a/test/miscellaneous/style_parser.cpp
+++ b/test/miscellaneous/style_parser.cpp
@@ -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());