2
0
mirror of https://github.com/boostorg/polygon.git synced 2026-01-28 07:22:29 +00:00

Polygon: fixing printf format in Voronoi basic tutorial.

Fixing printf format "%ud" to "%u"
This commit is contained in:
rydotyosh
2018-12-10 21:45:46 +09:00
committed by GitHub
parent 6ad90b5b68
commit 552f8ac233

View File

@@ -167,7 +167,7 @@ int main() {
if (it->contains_point()) {
std::size_t index = it->source_index();
Point p = points[index];
printf("Cell #%ud contains a point: (%d, %d).\n",
printf("Cell #%u contains a point: (%d, %d).\n",
cell_index, x(p), y(p));
} else {
std::size_t index = it->source_index() - points.size();
@@ -175,14 +175,14 @@ int main() {
Point p1 = high(segments[index]);
if (it->source_category() ==
boost::polygon::SOURCE_CATEGORY_SEGMENT_START_POINT) {
printf("Cell #%ud contains segment start point: (%d, %d).\n",
printf("Cell #%u contains segment start point: (%d, %d).\n",
cell_index, x(p0), y(p0));
} else if (it->source_category() ==
boost::polygon::SOURCE_CATEGORY_SEGMENT_END_POINT) {
printf("Cell #%ud contains segment end point: (%d, %d).\n",
printf("Cell #%u contains segment end point: (%d, %d).\n",
cell_index, x(p0), y(p0));
} else {
printf("Cell #%ud contains a segment: ((%d, %d), (%d, %d)). \n",
printf("Cell #%u contains a segment: ((%d, %d), (%d, %d)). \n",
cell_index, x(p0), y(p0), x(p1), y(p1));
}
}