lauantai 13. tammikuuta 2018

Dirty C


Sometimes C can make me feel ... dirty ... for writing code that should be relatively straightforward.

Case in point:

if ( ((unsigned int (*)(void))val)() )
   return;

I actually had to look up the syntax for that since this was the first time I actually have done this kind of operation, ever. Guess there is first time for everything...

(what? What this does, you want to know? I'll explain that in the next post ...)


Ei kommentteja:

Lähetä kommentti