Re: bool different in C and C++?

2017-11-19 Thread Thiago Macieira
On sábado, 18 de novembro de 2017 08:19:41 PST Berthold Stoeger wrote: > in core/pref.h we find the comment > /* can't use 'bool' for the boolean values - different size in C and C++ */ The comment is wrong. It's been wrong for 18 years, since C99 introduced stdbool.h. -- Thiago Macieira -

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-19 Thread Miika Turkia
On Sun, Nov 19, 2017 at 10:18 PM, Dirk Hohndel wrote: > > So today we don't store the password unless you tick that box - that was a > request from some of the testers back when we implemented cloud storage. > Funnily enough, every time I install Subsurface on a new test machine

Anybody with a Suunto EON Core?

2017-11-19 Thread Linus Torvalds
I just pushed out support for the new Suunto EON Core to the subsurface branch of libdivecomputer, but I don't actually have access to the hardware, so it's purely based on reporting from Nick Shore. It almost certainly "just works" (just different USB device ID and physical form factor,

Re: bool different in C and C++?

2017-11-19 Thread Berthold Stoeger
Hi Stefan, On Sonntag, 19. November 2017 23:07:43 CET Stefan Fuchs wrote: > Am 18.11.2017 um 19:40 schrieb Berthold Stoeger: > >> [...] > >> In fact, even when you can depend on a modern compiler, it's usually > >> best to restrict "bool" use entirely to just function return values > >> and very

Re: bool different in C and C++?

2017-11-19 Thread Stefan Fuchs
Am 18.11.2017 um 19:40 schrieb Berthold Stoeger: >> [...] >> In fact, even when you can depend on a modern compiler, it's usually >> best to restrict "bool" use entirely to just function return values >> and very local use. > I figure pref.h counts as such a local use, because it is purely an >

Re: Suspicious if/else constructs

2017-11-19 Thread Stefan Fuchs
Hallo Berthold, Am 19.11.2017 um 13:20 schrieb Berthold Stoeger: > There is another one that might be of interest to you: > In core/planner.c, the variable o2break_done is initialized and set, but > never > actually used. Thanks again. I - not long ago - changed there s.th. together with

Re: Suspicious if/else constructs

2017-11-19 Thread Dirk Hohndel
> On Nov 19, 2017, at 4:20 AM, Berthold Stoeger > wrote: > > The few remaining gcc/g++ -Wall warnings seem all to be either style > (operator > precedence) or irrelevant precision (weight certainly does not need more than > float precision) issues. Feel free to

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-19 Thread Dirk Hohndel
> On Nov 19, 2017, at 4:07 AM, Berthold Stoeger > wrote: >>> 1) In getCloudURL() in core/qthelper.cpp, the cloud_storate_email_encoded >>> member is set, but it seems not to be written to disk. >> >> I looked at that code recently and am struggling with the overall

Re: [Subsurface-divelog/subsurface] PATCH: Update the single-dive per page print template (#839)

2017-11-19 Thread Willem Ferguson
On 19/11/2017 19:22, Lubomir I. Ivanov wrote: @willemferguson @dirkhh we've discussed that we should not touch the old template which also implies renaming it. the solution is to create a new template with a different name.

[PATCH] Replace One Dive print template.

2017-11-19 Thread Willem Ferguson
I submitted a PR. Please check and see if it makes sense? Kind regards, wf -- This message and attachments are subject to a disclaimer. Please refer to http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf for full details. ___

Re: Suspicious if/else constructs

2017-11-19 Thread Berthold Stoeger
Hi Stefan, On Samstag, 18. November 2017 22:05:59 CET Stefan Fuchs wrote: > Am 18.11.2017 um 21:50 schrieb Berthold Stoeger: > > In qt-models/diveplannermodel.cpp:341, the if is indented as if it was > > part of the outer if. But it isn't owing to missing braces. Since I don't > > know the

Re: Replace repetitive code in SettingsObjectWrapper.cpp by functions?

2017-11-19 Thread Berthold Stoeger
Hi Dirk, On Sonntag, 19. November 2017 01:52:10 CET Dirk Hohndel wrote: > > On Nov 18, 2017, at 11:17 AM, Berthold Stoeger > > wrote: > > 1) In getCloudURL() in core/qthelper.cpp, the cloud_storate_email_encoded > > member is set, but it seems not to be written to