summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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());