Skip to content

Commit

Permalink
Remove itoa
Browse files Browse the repository at this point in the history
  • Loading branch information
Maginor committed Jun 24, 2024
1 parent 010e73b commit e76ed46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "lexer.h"

#include <limits>
#include <stdlib.h>

//NOTE: This is to produce excel-style cell names, like "K32". Doesn't really belong to this file except that this is where we decided to do the print Source_Location implementation.
char *
Expand All @@ -22,7 +21,8 @@ col_row_to_cell(int col, int row, char *buf) {
buf++;
}
}
itoa(row, buf, 10);
sprintf(buf, "%d", row);
//itoa(row, buf, 10);
while(*buf != 0) ++buf;
return buf;
}
Expand Down
4 changes: 2 additions & 2 deletions src/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <cmath>
#include <sstream>
#include <stdlib.h>

s16
parse_si_prefix(Token *token) {
Expand Down Expand Up @@ -377,7 +376,8 @@ write_utf8_superscript_char(std::ostream &ss, char c, int number = 0) {
void
write_utf8_superscript_number(std::ostream &ss, int number) {
static char buf[32];
itoa(number, buf, 10);
//itoa(number, buf, 10);
sprintf(buf, "%d", number);
char *c = &buf[0];
while(*c) {
write_utf8_superscript_char(ss, *c, number);
Expand Down

0 comments on commit e76ed46

Please sign in to comment.