Skip to content

python style floats: strcat -> strcpy #196

Closed
TravelMapping/DataProcessing
#507

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.

Activity

  1. added
    nmps
    on Oct 11, 2021
  2. changed the title [-]python style floats[/-] [+]python style floats: strcat -> strcpy[/+] on Oct 11, 2021
  3. yakra commented on Oct 25, 2021

    @yakra
    OwnerAuthor

    Tasks:

    • 'begin nmplogs|end nmplogs'
    • '\.\.\.routes|\.\.\.connectedRoutes'
    • UserLog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++nmpspendingspeed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions