Meqolo / cblox

cblox is a Roblox API wrapper written in C++
6 stars 1 forks source link

Changed little things #4

Closed jackprogramsjp closed 3 years ago

jackprogramsjp commented 3 years ago

Everything is really the same, except for a couple of things.

I have commented out the old code, if you want to keep that or not.

I have changed class Http to namespace Http, because there was no use to it being used as an object. All it needed was functions, which namespace can be used.

I have changed the Http function arguments to const lvalue references (would still work).

I have changed C string functions with an _s to snprintf or strncat. strcpy_s and strcat_s is an optional feature in C11 standard. We are using C++11 standard, which I believe does only go compatible with C99 standard and not C11 standard. Basically these _s functions wouldn't "exist" in C++11. I assume Meqolo was using VC++, which had these functions.

Lots of things can be fixed; later I'll be removing the C-style string functions and will be using STL strings because it is unnecessary to use C-style strings in C++.