summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-10-21 11:53:13 +0300
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-21 10:05:00 -0700
commite31a2c1c116cd79d8383b1cc9dd50862e87af941 (patch)
treea74d6b725209cd1a0b40e4cc2094c4c3ee765b9a
parentda9864f25d03cc8cda4df0cb7e675f3abca2a67b (diff)
downloadqtlocation-mapboxgl-e31a2c1c116cd79d8383b1cc9dd50862e87af941.tar.gz
[core] fixup formatting
-rw-r--r--src/mbgl/style/style.cpp4
-rw-r--r--test/style/source.test.cpp22
2 files changed, 13 insertions, 13 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 01ca5b6f36..e1cbe56bc5 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -494,8 +494,8 @@ void Style::onSourceError(Source& source, std::exception_ptr error) {
void Style::onSourceDescriptionChanged(Source& source) {
observer->onSourceDescriptionChanged(source);
if (!source.baseImpl->loaded) {
- source.baseImpl->loadDescription(fileSource);
- }
+ source.baseImpl->loadDescription(fileSource);
+ }
}
void Style::onTileChanged(Source& source, const OverscaledTileID& tileID) {
diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp
index 3aebe10769..73908a144b 100644
--- a/test/style/source.test.cpp
+++ b/test/style/source.test.cpp
@@ -384,7 +384,7 @@ TEST(Source, RasterTileAttribution) {
TEST(Source, GeoJSonSourceUrlUpdate) {
SourceTest test;
-
+
test.fileSource.sourceResponse = [&] (const Resource& resource) {
EXPECT_EQ("url", resource.url);
Response response;
@@ -394,7 +394,7 @@ TEST(Source, GeoJSonSourceUrlUpdate) {
test.observer.sourceDescriptionChanged = [&] (Source&) {
//Should be called (test will hang if it doesn't)
- test.end();
+ test.end();
};
test.observer.tileError = [&] (Source&, const OverscaledTileID&, std::exception_ptr) {
@@ -403,15 +403,15 @@ TEST(Source, GeoJSonSourceUrlUpdate) {
GeoJSONSource source("source");
source.baseImpl->setObserver(&test.observer);
-
- //Load initial, so the source state will be loaded=true
- source.baseImpl->loadDescription(test.fileSource);
-
- //Schedule an update
- test.loop.invoke([&] () {
- //Update the url
- source.setURL(std::string("http://source-url.ext"));
- });
+
+ //Load initial, so the source state will be loaded=true
+ source.baseImpl->loadDescription(test.fileSource);
+
+ //Schedule an update
+ test.loop.invoke([&] () {
+ //Update the url
+ source.setURL(std::string("http://source-url.ext"));
+ });
test.run();
}