bool maps_address_is_valid(const maps_address_h address)
{
if (!maps_condition_check_maps_feature())
- return MAPS_ERROR_NOT_SUPPORTED;
+ return false;
if (!address) return false;
bool ret = false;
bool maps_area_is_valid(const maps_area_h area)
{
if (!maps_condition_check_maps_feature())
- return MAPS_ERROR_NOT_SUPPORTED;
+ return false;
if (!area) return false;
bool ret = true;
bool maps_coordinates_is_valid(const maps_coordinates_h coordinates)
{
- if (!coordinates)
- return false;
+ bool ret_val = true;
- maps_coordinates_s *coord = (maps_coordinates_s *)coordinates;
+ if (!coordinates)
+ return false;
- MAPS_CHECK_CONDITION(coord->latitude >= -90 && coord->latitude <= 90, MAPS_ERROR_INVALID_PARAMETER,
- "MAPS_ERROR_INVALID_PARAMETER");
- MAPS_CHECK_CONDITION(coord->longitude >= -180 && coord->longitude <= 180, MAPS_ERROR_INVALID_PARAMETER,
- "MAPS_ERROR_INVALID_PARAMETER");
+ maps_coordinates_s *coord = (maps_coordinates_s *)coordinates;
+
+ if (!(coord->latitude >= -90 && coord->latitude <= 90)) {
+ MAPS_LOGE("%s(0x%08x)", "MAPS_ERROR_INVALID_PARAMETER", MAPS_ERROR_INVALID_PARAMETER);
+ ret_val = false;
+ goto END;
+ }
+
+ if (!(coord->longitude >= -180 && coord->longitude <= 180)) {
+ MAPS_LOGE("%s(0x%08x)", "MAPS_ERROR_INVALID_PARAMETER", MAPS_ERROR_INVALID_PARAMETER);
+ ret_val = false;
+ goto END;
+ }
+
+END:
+ return ret_val;
- return true;
}