Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
1 changed files with 7 additions and 0 deletions
Showing only changes of commit 7ea8fc0e52 - Show all commits

View File

@ -7,10 +7,17 @@
namespace JabyEngine {
static constexpr auto ITOABufferSize = 32;
// Can we not find a better version of this?
static char* simple_itoa(char (&buffer)[ITOABufferSize], bool is_neg, uint32_t value, uint32_t base) {
// v terminating 0 and space for sign
int i = ITOABufferSize - 2;
if(value == 0) {
buffer[0] = '0';
buffer[1] = '\0';
return buffer;
}
for(; value && i; i--, value /= base) {
char chr = '0' + value%base;
if(chr > '9') {