Skip to content

Commit 3265ccf

Browse files
committed
Undone rename of compareWithMapcodeFormat
1 parent 7b58601 commit 3265ccf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

mapcodelib/mapcoder.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ UWORD *convertToAlphabet(UWORD *utf16String, int maxLength, const char *asciiStr
19401940

19411941
///////////////////////////////////////////////////////////////////////////////////////////////
19421942
//
1943-
// hasMapcodeFormat & parseMapcode
1943+
// compareWithMapcodeFormat & parseMapcode
19441944
//
19451945
///////////////////////////////////////////////////////////////////////////////////////////////
19461946

@@ -2101,7 +2101,7 @@ int parseMapcodeString(MapcodeElements *mapcodeFormat, const char *asciiString,
21012101
}
21022102
}
21032103

2104-
int hasMapcodeFormat(const char *asciiString, int includesTerritory) {
2104+
int compareWithMapcodeFormat(const char *asciiString, int includesTerritory) {
21052105
return parseMapcodeString(NULL, asciiString, includesTerritory, 0);
21062106
}
21072107

mapcodelib/mapcoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ int decodeMapcodeToLatLon(
174174
* Special value COMPARE_MAPCODE_MISSING_CHARACTERS (-999) indicates the string could be a Mapcode, but it seems
175175
* to lack some characters.
176176
*/
177-
int hasMapcodeFormat(
177+
int compareWithMapcodeFormat(
178178
const char *asciiString,
179179
int includesTerritory);
180180

unittest/unittest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,12 @@ static int test_mapcode_formats(void) {
394394
char str[MAX_MAPCODE_RESULT_LEN + 16];
395395
MapcodeElements mapcodeElements;
396396
int result = parseMapcodeString(&mapcodeElements, testpairs[i], 1, 0);
397-
int format = hasMapcodeFormat(testpairs[i], 1);
397+
int format = compareWithMapcodeFormat(testpairs[i], 1);
398398

399399
nrTests++;
400400
if ((!result && format) || (result && !format)) {
401401
found_error();
402-
printf("*** ERROR *** parseMapcodeString=%d, hasMapcodeFormat=%d\n", result, format);
402+
printf("*** ERROR *** parseMapcodeString=%d, compareWithMapcodeFormat=%d\n", result, format);
403403
}
404404

405405
nrTests++;
@@ -421,7 +421,7 @@ static int test_mapcode_formats(void) {
421421
sprintf(str, "%d", result);
422422
if (testpairs[i + 1][0] != 0 && strcmp(str, testpairs[i + 1]) != 0) {
423423
found_error();
424-
printf("*** ERROR *** hasMapcodeFormat(\"%s\") failed unexpectedly %d\n", testpairs[i], result);
424+
printf("*** ERROR *** compareWithMapcodeFormat(\"%s\") failed unexpectedly %d\n", testpairs[i], result);
425425
}
426426
}
427427
}

0 commit comments

Comments
 (0)