vroom icon indicating copy to clipboard operation
vroom copied to clipboard

Refactor/use format

Open SebMilardo opened this issue 1 year ago • 2 comments

Issue

Fixes #1081

Tasks

  • [x] Use std::format instead of concatenating pieces manually
  • [ ] review

SebMilardo avatar Apr 11 '24 09:04 SebMilardo

Thanks for the PR! Looks great overall, the error messages are much more readable now.

Sonarcloud is complaining about not using raw string literals to avoid escaping, but I don't know how this plays along with std::format?

It looks like I have to rewrite them as:

R"({{"lon":{},"lat":{},"type":"break"}},)"

and

R"({{"lon":{},"lat":{}}},)"

Let me push a commit...

SebMilardo avatar Apr 11 '24 11:04 SebMilardo

Thanks for the changes, looks all good to me.

The only weird thing is we'll have to wait to merge since our compiler versions in CI will error on std::format currently. Thus there is no point in enabling the CI checks right now either since they're bound to fail. Let's leave this open for now and revisit once #1080 lands.

jcoupey avatar Apr 11 '24 12:04 jcoupey

We should now be able to let this run through the CI checks after upgrading compiler versions in #1113.

@SebMilardo could you pull the latest master on your fork and git merge --no-ff master into your PR branch? I did just that but it looks like I'm not allowed to push to your fork.

jcoupey avatar May 22 '24 12:05 jcoupey

It should be ok now

SebMilardo avatar May 22 '24 12:05 SebMilardo