View Single Post
Old 10/12/2016, 02:53 PM   #3587
Logic_'s Avatar
Join Date: Jun 2015
Location: Oblivion (#RIPX)
Posts: 1,465
Reputation: 263
Default Re: Little coding questions - For general minor queries 5

Originally Posted by PrO.GameR View Post
Directly returning strings as a function result have caused me so many problems before, specially when working alongside enums, I suggest you to make a local string in the function, use strcat to concat the name to it, and then return that local string.
I did this way before you replied and it worked. Thanks anyways.

Originally Posted by Hansrutger View Post
Same in my case, I cannot explain why though. :/
Check my above reply.

Originally Posted by Sreyas View Post
thats a bad coding don't do like that.Why to provide extra overhead while it is accessible directly? Keep the code optmised as possible.
Easier to write for me and optimization is not really needed everywhere or in this case, this code. Making the array const would make it faster as well as I guess?
RIP XXXTentacion [1998-2018]

My Releases: Click me!

Past experiences:
Ex- Developer of COD: Black Ops 3 [2017 - 2018], Palomino Creek RP [2018], NEG [2017], Zombieland [2015]
Logic_ is offline   Reply With Quote