Shouldn't this just be removed?

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
Self_Destructo
Round Winner
Posts: 317
Joined: Tue Jun 07, 2005 1:24 am
Location: HillBilly Country
Contact:

Shouldn't this just be removed?

Post by Self_Destructo »

In armagetronad\src\defs.h I get an error: src/defs.h:105: error: new declaration `bool isblank(int)'. This is no surprise since it was expected (http://wiki.armagetronad.net/index.php? ... leshooting). But, the code seems completely dumb because we just simply comment it out and move on. Therefore, if it's only for WIN32 and the function doesn't exist in Windows it should be removed, right?

Code: Select all

#ifdef WIN32
// this function does not seem to exist in windows...
inline bool isblank(int x){ return ((x == ' ') || (x == '\t')); }
#endif
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

To quote the wiki, "you may have...". What compilation environment are you using? I've never had an issue with this line with all the versions of Visual Studio (6 and 2003 Express) and Code::Blocks (latest RC) I tested, and in fact it would not compile without this line (at least with VS6 where the line originates from), so it can't be removed. What is needed instead is a better #ifdef statement that recognizes the situations where the function already exists. Any ideas?
User avatar
Self_Destructo
Round Winner
Posts: 317
Joined: Tue Jun 07, 2005 1:24 am
Location: HillBilly Country
Contact:

Post by Self_Destructo »

I'm using the latest Code Blocks. I'm not a programmer so I wouldn't have an idea as to what to do.
Post Reply