fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
75 stars 10 forks source link

Don't treat empty output filename specially (fix #27) #30

Closed rrthomas closed 4 years ago

rrthomas commented 4 years ago

I agree that an optional would be better.

fmang commented 4 years ago

You should now be able to use std::optional: 5ea2db2d6d57315c99922684a67005fbcc62fc3d

rrthomas commented 4 years ago

I've updated the branch to use std::optional.

fmang commented 4 years ago

Pretty cool! Why bother with all the casts though? If I’m not mistaken:

  1. x = std::optional(y) could be written x = y.
  2. x.value() == y could be written x == y.
  3. x.value().c_str() could be written x->c_str().
rrthomas commented 4 years ago

Because I don't know much C++! PR updated.

fmang commented 4 years ago

Thanks!