samedi 29 novembre 2014

const parameter with inline functions


Vote count:

0




I have a inline function, that does some initialization based on the input parameters and was wondering if I should use const keyword for the parameters, would that enable the compiler to do some more optimizations? For example this pseudo code:



inline void init(ENUM1 e1, ENUM2 e2, bool b1, bool b2, ENUM3 e3)
{
if(b1) {...}

switch(e2) {
...
}

// And so on...
}


Thanks in advance!



asked 55 secs ago







const parameter with inline functions

Aucun commentaire:

Enregistrer un commentaire