jeudi 27 avril 2017

initialize unsigned int to 0?

In the code base, I often see people writing

void f(unsigned int){/* some stuff*/ }; // define f here
f(0) // call f later
unsigned int a = 0;
double d = 0;

Initialized number (0 here) not matching the declared type annoys me, if this is performance critical code, does this kind of initialization hurt performance?

Aucun commentaire:

Enregistrer un commentaire