blackberry-gaming/GamePlay — comment on commit caec3612a66fa6e5a3197756ccef19b835ba6f64
File: gameplay/src/MaterialParameter.cpp line 400
By seanpaultaylor:

Lots of duplicated code here and in many cases below. Consider setting the UNIFORM_BIT and then running the conditional algorithm for each case. This should reduce a lot of code. Also you could probably even go further. Since only the number of components change for each VECTOR2/3/4, etc.
You could break of this code to a common function passing the number of component for the for loops.