Skip to content

Commit

Permalink
Review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Yunitsky authored and syershov committed Mar 23, 2016
1 parent f18e275 commit 8c49302
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions android/jni/com/mapswithme/maps/editor/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,10 @@ JNIEXPORT jobjectArray JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeGetCuisines(JNIEnv * env, jclass clazz)
{
osm::TAllCuisines const & cuisines = osm::Cuisines::Instance().AllSupportedCuisines();
vector<string> keys(cuisines.size());
for (size_t i = 0; i < cuisines.size(); i++)
keys[i] = cuisines[i].first;
vector<string> keys;
keys.reserve(cuisines.size());
for (TCuisine const & cuisine : cuisines)
keys.push_back(cuisine.first);
return ToJavaArray(env, keys);
}

Expand All @@ -308,9 +309,10 @@ JNIEXPORT jobjectArray JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeGetCuisinesTranslations(JNIEnv * env, jclass clazz)
{
osm::TAllCuisines const & cuisines = osm::Cuisines::Instance().AllSupportedCuisines();
vector<string> keys(cuisines.size());
for (size_t i = 0; i < cuisines.size(); i++)
keys[i] = cuisines[i].second;
vector<string> keys;
keys.reserve(cuisines.size());
for (TCuisine const & cuisine : cuisines)
keys.push_back(cuisine.second);
return ToJavaArray(env, keys);
}

Expand Down
6 changes: 3 additions & 3 deletions android/res/layout/fragment_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
android:layout_alignLeft="@id/street"
android:layout_alignStart="@id/street"
android:layout_below="@id/street"
android:layout_marginTop="6dp"
android:layout_marginTop="@dimen/margin_quarter_plus"
android:background="@color/divider"/>

</RelativeLayout>
Expand Down Expand Up @@ -253,7 +253,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/editor_margin_left"
android:layout_marginStart="@dimen/editor_margin_left"
android:text="@string/street"
android:text="@string/cuisine"
android:textAppearance="@style/MwmTextAppearance.Body4"/>

<TextView
Expand All @@ -273,7 +273,7 @@
android:layout_alignLeft="@id/cuisine"
android:layout_alignStart="@id/cuisine"
android:layout_below="@id/cuisine"
android:layout_marginTop="6dp"
android:layout_marginTop="@dimen/margin_quarter_plus"
android:background="@color/divider"/>

</RelativeLayout>
Expand Down

0 comments on commit 8c49302

Please sign in to comment.