Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/3] mjpeg-fallback: a more C++ way of handling options

2018-02-13 Thread Lukáš Hrázký
On Tue, 2018-02-13 at 09:18 -0500, Frediano Ziglio wrote: > I would use a more "polite": "a more high level way of handling options" Ok :) > > > > Use C++ standard library: > > - std::string > > - std::stoi() to parse the numbers (also note atoi() behavior is undefined > > in > > case of erro

Re: [Spice-devel] [PATCH spice-streaming-agent v2 1/3] mjpeg-fallback: a more C++ way of handling options

2018-02-13 Thread Frediano Ziglio
I would use a more "polite": "a more high level way of handling options" > > Use C++ standard library: > - std::string > - std::stoi() to parse the numbers (also note atoi() behavior is undefined in > case of errors) > - exceptions for errors, makes testing and potential future changes to > e

[Spice-devel] [PATCH spice-streaming-agent v2 1/3] mjpeg-fallback: a more C++ way of handling options

2018-02-13 Thread Lukáš Hrázký
Use C++ standard library: - std::string - std::stoi() to parse the numbers (also note atoi() behavior is undefined in case of errors) - exceptions for errors, makes testing and potential future changes to error handling easier. Signed-off-by: Lukáš Hrázký --- src/mjpeg-fallback.cpp | 41