lanurmi / efte

eFTE is a fork of FTE -- Folding Text Editor
GNU General Public License v2.0
31 stars 11 forks source link

Asserts should not have any code in them because when NDEBUG is defined, #99

Closed dmcbride closed 8 years ago

dmcbride commented 8 years ago

assert expressions get compiled entirely away.

I didn't do the OS2 ones because I don't have such a system to compile with anymore. (Arguably, OS/2 support could be dropped since IBM stopped supporting that OS over ten years ago.)

lanurmi commented 8 years ago

But Bill Gates said OS/2 is the operating system of the future. The future will soon be here.

Well, seriously though, maintaining OS/2 support doesn't require much effort (at least so far), and it is the only OS for which eFTE has a proper GUI (see #45). I like keeping eFTE compatible with old operating systems.

As for the commit, changes to con_x11.cpp are incorrectly indented with tabs; please amend that. Going through the OS/2 asserts would be useful too, and the possible changes should be trivial enough to make blindly, without compiling.

dmcbride commented 8 years ago

Hey, I started using FTE on OS/2, so I'm a bit partial. However, I don't have the header files to know what all the functions return anymore, so when looking at the create-mutex or other functions, I don't know what variable type to store them in.

As for the tabs, I'll take a look, but I'm using eFTE to write this in, with all default settings, which I thought is what you wanted ;)

dmcbride commented 8 years ago

Tabs are gone - I've changed my settings to get rid of this problem, I hope. If someone still has an OS/2 compiler, we could tackle that. However, OS/2 isn't harmed per se - without any changes, eFTE will continue to work as long as they don't define (-D) NDEBUG during compilation.