genn-team / genn

GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.
http://genn-team.github.io/
GNU Lesser General Public License v2.1
233 stars 57 forks source link

Unnecessary calls to toString(char s) #85

Closed jamesturner246 closed 8 years ago

jamesturner246 commented 8 years ago

I've noticed a number of calls to toString when assigning a cstring to a string. Assignment of cstrings to string variables has been supported since C++98 - see:

http://www.cplusplus.com/reference/string/string/operator=/

The only time a call to toString is necessary is when concatenating two cstrings with the '+' operator - i.e. only when neither LHS or RHS of s1 + s2 is a string. I've removed a lot of unnecessary calls to toString from my 'separate_genn_obj_compile' branch.

Note that this also makes the alternaive functions for char arrays, such as one of the addSynapsePopulations, redundant.

jamesturner246 commented 8 years ago

Closed (no further action).