good points. since the parameter is a const char*, it can't be modified as is, so a copy of the parameter will have to be made at some point, whether as a c-string or as a c++ string. Also, you mention trimming down the code, but doing what you suggested would make the code much longer and maybe less clear: string name = name_cstr;
toLower(&name); versus your suggestion, without tolower: char name[128];
snprintf(name,sizeof(name),"%s",name_cstr);
int len = strlen(name);
for (int x = 0; x < len; ++x)
{
if (name[x] >= 'A' && name[x] <= 'Z')
name[x] += ('a' - 'A');
} another important point, in any project, but especially in large projects like Discretion, is to optimize where it matters. If you look at the physics module, which has code executed potentially hundreds of times a second, you'll notice I spent a great deal of time optimizing at the expense of code clarity. This function, playLoopingAnimation, is called at the start of every animation that runs in a loop, so at most five times a second. Gaining 10 nanoseconds here will make little difference in overall performance. One can always optimize code more (even going down to !@#$%^&*embly sometimes), but it's a balance that needs to be achieved based on your program's demands. btw I've been doing some more work on the net and filetransfer modules... expect STP to be working soon then I'll see about getting the linux version to compile for you.