Originally Posted by mhoover I'm trying to remove branches from my code so it consumes less %cpu. Qt Code: Switch view if ( b ) { a = c;} else { a = d;} if ( b ) { a = c; } else { a = d; } To copy to clipboard, switch view to plain text mode Preload variable a before the if statement - Qt Code: Switch view a = d;if(b) a = c; a = d; if(b) a = c; To copy to clipboard, switch view to plain text mode
if ( b ) { a = c;} else { a = d;}
if ( b ) { a = c; } else { a = d; }
a = d;if(b) a = c;
a = d; if(b) a = c;
Forum Rules
Bookmarks