Merge branch 'master' into release-android-v3.2.0

This commit is contained in:
Brad Leege
2016-01-28 14:00:23 -06:00
6 changed files with 20 additions and 7 deletions

View File

@@ -146,7 +146,7 @@ private:
private:
template <std::size_t... I>
void invoke(std::index_sequence<I...>) {
func(std::get<I>(std::forward<P>(params))...);
func(std::move(std::get<I>(std::forward<P>(params)))...);
}
std::recursive_mutex mutex;

View File

@@ -5,6 +5,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.widget.TextView;
import com.mapbox.geocoder.GeocoderCriteria;
@@ -155,4 +156,14 @@ public class GeocoderActivity extends AppCompatActivity {
textView.setText("Error: " + message);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}

View File

@@ -5,7 +5,7 @@ set -o pipefail
set -u
if [ -z `which jazzy` ]; then
step "Installing jazzy…"
echo "Installing jazzy…"
gem install jazzy
if [ -z `which jazzy` ]; then
echo "Unable to install jazzy. See https://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/INSTALL.md"

View File

@@ -37,7 +37,7 @@ TileWorker::~TileWorker() {
}
TileParseResult TileWorker::parseAllLayers(std::vector<std::unique_ptr<StyleLayer>> layers_,
const GeometryTile& geometryTile,
std::unique_ptr<const GeometryTile> geometryTile,
PlacementConfig config) {
// We're doing a fresh parse of the tile, because the underlying data has changed.
pending.clear();
@@ -55,7 +55,7 @@ TileParseResult TileWorker::parseAllLayers(std::vector<std::unique_ptr<StyleLaye
const StyleLayer* layer = i->get();
if (parsed.find(layer->bucketName()) == parsed.end()) {
parsed.emplace(layer->bucketName());
parseLayer(layer, geometryTile);
parseLayer(layer, *geometryTile);
}
}

View File

@@ -50,7 +50,7 @@ public:
~TileWorker();
TileParseResult parseAllLayers(std::vector<std::unique_ptr<StyleLayer>>,
const GeometryTile&,
std::unique_ptr<const GeometryTile> geometryTile,
PlacementConfig);
TileParseResult parsePendingLayers(PlacementConfig);

View File

@@ -16,10 +16,12 @@ public:
Impl() = default;
void parseRasterTile(std::unique_ptr<RasterBucket> bucket,
const std::shared_ptr<const std::string> data,
std::shared_ptr<const std::string> data,
std::function<void(RasterTileParseResult)> callback) {
try {
bucket->setImage(decodeImage(*data));
// Destruct the shared pointer before calling the callback.
data.reset();
callback(RasterTileParseResult(std::move(bucket)));
} catch (...) {
callback(std::current_exception());
@@ -32,7 +34,7 @@ public:
PlacementConfig config,
std::function<void(TileParseResult)> callback) {
try {
callback(worker->parseAllLayers(std::move(layers), *tile, config));
callback(worker->parseAllLayers(std::move(layers), std::move(tile), config));
} catch (...) {
callback(std::current_exception());
}