Skip to content

Commit bc304cc

Browse files
committed
Clean up; corrected tests
1 parent 2fe4efa commit bc304cc

File tree

8 files changed

+15975
-15933
lines changed

8 files changed

+15975
-15933
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
cmake_minimum_required(VERSION 3.2)
1+
cmake_minimum_required(VERSION 3.3)
22
project(mapcode_cpp)
33

44
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
55

66
set(SOURCE_FILES
77
mapcodelib/basics.h
8-
mapcodelib/dividemaps.h
98
mapcodelib/mapcode_countrynames.h
109
mapcodelib/mapcode_countrynames_short.h
10+
mapcodelib/mapcode_fast_encode.h
11+
mapcodelib/mapcode_fastalpha.h
1112
mapcodelib/mapcoder.c
1213
mapcodelib/mapcoder.h
14+
unitttest/decode_test.h
15+
unitttest/test_territories.c
16+
unitttest/unittest.c
1317
utility/mapcode.cpp)
1418

1519
add_executable(mapcode_cpp ${SOURCE_FILES})

README.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ Also see www.mapcode.com for background and reference materials.
3434

3535
Note: this version may be restricted to a particular area of the Earth!
3636
In that case, basics.h will state a version number of the for:
37+
3738
#define mapcode_cversion "1.2xxx"
39+
3840
where "xxx" states the geographical limitation.
3941

4042

@@ -59,60 +61,64 @@ decode Mapcodes.
5961

6062
# Release Notes
6163

62-
* 2.2
64+
* 2.2.1
6365

64-
Solved 1-microdegree gap in a few spots on Earth, noticable now extreme precision is possible
66+
Solved 1-microdegree gap in a few spots on Earth, noticable now extreme precision is possible.
6567

6668
* 2.1.5
6769

68-
Added stricter unit tests
70+
Added stricter unit tests.
6971

7072
* 2.1.4
7173

72-
Added maxErrorinMeters to API;
74+
Added `maxErrorInMetersz` to API.
7375

74-
Moved recode logic into decoder; adjusted unit test.
76+
Moved recode logic into decoder.
77+
78+
Adjusted unit test.
7579

7680
* 2.1.3
7781

78-
Added useful routine DistanceInMeters to API
82+
Added useful routine `DistanceInMeters` to API.
7983

8084
* 2.1.2
8185

82-
Rewrote fraction floating points to integer arithmetic
86+
Rewrote fraction floating points to integer arithmetic.
8387

8488
* 2.1.1
8589

86-
Added unittest\*.* which can be compiled and executed to check
90+
Added `unittest/` which can be compiled and executed to check
8791
if the mapcode library performs as expected.
8892

8993
* 2.1.0
9094

91-
Fixes floating point inaccuracy (prevent encode(decode(M)) != M
95+
Fixes floating point inaccuracy (prevent `encode(decode(M)) != M`).
9296

9397
* 2.0.3
9498

95-
Added #define FAST_ALPHA for faster alphacode string recognition;
99+
Added `#define FAST_ALPHA` for faster alphacode string recognition.
96100

97101
* 2.0.2.4
98102

99-
Added point structs to source
103+
Added point structs to source.
100104

101105
* 2.0.2.3
102106

103-
Cleaned up source
107+
Cleaned up source.
104108

105109
* 2.0.2.2
106110

107-
Cleaned up source
111+
Cleaned up source.
108112

109113
* 2.0.2.1
110114

111-
Cleaned up source, removed legacy code; Renamed dividemaps.h to mapcode_fast_encode.h;
115+
Cleaned up source, removed legacy code.
116+
117+
Renamed `dividemaps.h` to `mapcode_fast_encode.h`.
112118

113-
Improved convertToRoman and convertToAlphabet to trim and skip leading territory;
119+
Improved `convertToRoman` and `convertToAlphabet` to trim and skip leading territory.
114120

115-
Rolled back 2.0.2 fix for letters "i" and "o" in Hindi, Bengali, Tibetan and Gurmukhi;
121+
Rolled back 2.0.2 fix for letters "i" and "o" in Hindi, Bengali, Tibetan and Gurmukhi.
116122

117123
* 2.0.2
118124

0 commit comments

Comments
 (0)