Removed unused code
Signed-off-by: S. Kozyr <s.trump@gmail.com>
This commit is contained in:
parent
9b1fa93b37
commit
eef4ff08fa
4 changed files with 0 additions and 28 deletions
|
@ -49,14 +49,6 @@ Java_app_organicmaps_util_StringUtils_nativeFilterContainsNormalized(JNIEnv * en
|
|||
return jni::ToJavaStringArray(env, filtered);
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL Java_app_organicmaps_util_StringUtils_nativeFormatSpeedAndUnits(
|
||||
JNIEnv * env, jclass thiz, jdouble metersPerSecond)
|
||||
{
|
||||
auto const units = measurement_utils::GetMeasurementUnits();
|
||||
return MakeJavaPair(env, measurement_utils::FormatSpeedNumeric(metersPerSecond, units),
|
||||
platform::GetLocalizedSpeedUnits(units));
|
||||
}
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_app_organicmaps_util_StringUtils_nativeFormatDistance(JNIEnv * env, jclass, jdouble distanceInMeters)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,6 @@ public class StringUtils
|
|||
public static native boolean nativeContainsNormalized(String str, String substr);
|
||||
public static native String[] nativeFilterContainsNormalized(String[] strings, String substr);
|
||||
|
||||
public static native Pair<String, String> nativeFormatSpeedAndUnits(double metersPerSecond);
|
||||
public static native Distance nativeFormatDistance(double meters);
|
||||
@NonNull
|
||||
public static native Pair<String, String> nativeGetLocalizedDistanceUnits();
|
||||
|
|
|
@ -465,20 +465,6 @@ double RoutingSession::GetCompletionPercent() const
|
|||
return percent;
|
||||
}
|
||||
|
||||
bool RoutingSession::IsSpeedLimitExceeded(double currentSpeedMps, double speedLimitMps,
|
||||
const measurement_utils::Units units)
|
||||
{
|
||||
if (currentSpeedMps <= 0 || speedLimitMps <= 0)
|
||||
return false;
|
||||
|
||||
// First convert meters/s to localized units
|
||||
double currentSpeedLocal = measurement_utils::MpsToUnits(currentSpeedMps, units);
|
||||
double speedLimitLocal = measurement_utils::MpsToUnits(speedLimitMps, units);
|
||||
|
||||
// Floor speed and limit speed before comparison
|
||||
return static_cast<int>(currentSpeedLocal) > static_cast<int>(speedLimitLocal);
|
||||
}
|
||||
|
||||
void RoutingSession::PassCheckpoints()
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
|
|
|
@ -174,11 +174,6 @@ public:
|
|||
|
||||
double GetCompletionPercent() const;
|
||||
|
||||
// Convert speed and speed limit from meters/sec to miles/h or km/h.
|
||||
// If current speed is the less or equal to max allowed speed then return false.
|
||||
// We do comparison using floored speed values because on UI user see such values.
|
||||
static bool IsSpeedLimitExceeded(double currentSpeedMps, double speedLimitMps, measurement_utils::Units units);
|
||||
|
||||
private:
|
||||
struct DoReadyCallback
|
||||
{
|
||||
|
|
Reference in a new issue