Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorYury Melnichek <melnichek@gmail.com>2013-03-20 03:03:07 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:51:51 +0300
commit7c30a7b80f64cc8403c76bb2e135a9f982e52e46 (patch)
tree6ae48662dd339491c2d4e4d31c559d682092fcfd /api
parentcf123901ff0029c94c29512a94a4b240855f3c37 (diff)
[api] Change the order or parameters.
Diffstat (limited to 'api')
-rw-r--r--api/src/c/api-client.c2
-rw-r--r--api/tests/c/api-client-test.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/api/src/c/api-client.c b/api/src/c/api-client.c
index ffb1023e31..8935993ab1 100644
--- a/api/src/c/api-client.c
+++ b/api/src/c/api-client.c
@@ -45,7 +45,7 @@ int MapsWithMe_LonToInt(double lon, int maxValue)
return (x <= 0 || x >= maxValue + 1) ? 0 : (int)x;
}
-void MapsWithMe_LatLonToString(double lat, double lon, int nBytes, char * s)
+void MapsWithMe_LatLonToString(double lat, double lon, char * s, int nBytes)
{
if (nBytes > MAPSWITHME_MAX_POINT_BYTES)
nBytes = MAPSWITHME_MAX_POINT_BYTES;
diff --git a/api/tests/c/api-client-test.c b/api/tests/c/api-client-test.c
index 86e4c4373d..ba74e164c1 100644
--- a/api/tests/c/api-client-test.c
+++ b/api/tests/c/api-client-test.c
@@ -5,7 +5,7 @@ char MapsWithMe_Base64Char(int x);
int MapsWithMe_LatToInt(double lat, int maxValue);
double MapsWithMe_LonIn180180(double lon);
int MapsWithMe_LonToInt(double lon, int maxValue);
-void MapsWithMe_LatLonToString(double lat, double lon, int nBytes, char * s);
+void MapsWithMe_LatLonToString(double lat, double lon, char * s, int nBytes);
static const int MAX_POINT_BYTES = 10;
static const int TEST_COORD_BYTES = 9;
@@ -13,7 +13,7 @@ static const int TEST_COORD_BYTES = 9;
char const * TestLatLonToStr(double lat, double lon)
{
static char s[TEST_COORD_BYTES + 1] = {0};
- MapsWithMe_LatLonToString(lat, lon, TEST_COORD_BYTES, s);
+ MapsWithMe_LatLonToString(lat, lon, s, TEST_COORD_BYTES);
return s;
}
@@ -196,13 +196,13 @@ FCT_BGN()
for (double lon = -190; lon < 190; lon += 0.9)
{
char prevStepS[MAX_POINT_BYTES + 1] = {0};
- MapsWithMe_LatLonToString(lat, lon, MAX_POINT_BYTES, prevStepS);
+ MapsWithMe_LatLonToString(lat, lon, prevStepS, MAX_POINT_BYTES);
for (int len = MAX_POINT_BYTES - 1; len > 0; --len)
{
// Test that the current string is a prefix of the previous one.
char s[MAX_POINT_BYTES] = {0};
- MapsWithMe_LatLonToString(lat, lon, len, s);
+ MapsWithMe_LatLonToString(lat, lon, s, len);
prevStepS[len] = 0;
fct_chk_eq_str(s, prevStepS);
}
@@ -225,7 +225,7 @@ FCT_BGN()
for (double lon = -180; lon < 180; lon += 0.05)
{
char s[3] = {0};
- MapsWithMe_LatLonToString(lat, lon, 2, s);
+ MapsWithMe_LatLonToString(lat, lon, s, 2);
++num1[b64toI[s[0]]];
++num2[b64toI[s[0]]][b64toI[s[1]]];
}