diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-10-30 11:06:59 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-11-17 15:13:38 -0800 |
commit | 38fcbe21d48186c4630a3b8a76d1b20e156faadd (patch) | |
tree | 098f73bfea98deb5202fe1c13b1277e43e322755 /test/gl | |
parent | d4fc66af3924805d40576989c1e139ddafcc4670 (diff) | |
download | qtlocation-mapboxgl-38fcbe21d48186c4630a3b8a76d1b20e156faadd.tar.gz |
[core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.
The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.
Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
Diffstat (limited to 'test/gl')
-rw-r--r-- | test/gl/bucket.test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp index 419aee183f..03cdc63a91 100644 --- a/test/gl/bucket.test.cpp +++ b/test/gl/bucket.test.cpp @@ -30,7 +30,7 @@ TEST(Buckets, LineBucket) { TEST(Buckets, SymbolBucket) { mbgl::MapMode mapMode = mbgl::MapMode::Still; - mbgl::style::SymbolLayoutProperties properties; + mbgl::style::SymbolLayoutProperties::Evaluated properties; bool sdfIcons = false; bool iconsNeedLinear = false; |