Skip to content

python style floats: strcat -> strcpy #196

Description

@yakra
sprintf(coordstr, " %.15g", lat);
if (!strchr(coordstr, '.')) strcat(coordstr, ".0");

->

int e = sprintf(coordstr, " %.15g", lat);
if (!strchr(coordstr, '.')) strcpy(coordstr+e, ".0");

Better yet?

int e = sprintf(coordstr, " %.15g", lat);
if (lat==int(lat)) strcpy(coordstr+e, ".0");
  • Waypoint::nmplogs
  • Waypoint::str()
  • Route::csv_line()
  • TravelerList::userlog can wait, to avoid merge conflicts. Those cases will disappear when the ClinchedDBValues class is removed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions