From c55a2882dc1ab4691df65692080441e03b6d86cd Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 23 Sep 2012 12:05:28 +0200 Subject: [PATCH] Replace Maxsi::String::ToInt with atoi. --- sortix/bga.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sortix/bga.cpp b/sortix/bga.cpp index 6d4e4166..f985b379 100644 --- a/sortix/bga.cpp +++ b/sortix/bga.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "x86-family/memorymanagement.h" #include "lfbtextbuffer.h" @@ -308,9 +309,9 @@ bool BGADriver::SwitchMode(const char* mode) char* bppstr = NULL; if ( !ReadParamString(mode, "width", &xstr, "height", &ystr, "bpp", &bppstr, "STOP") ) { return false; } - uint16_t xres = xstr ? Maxsi::String::ToInt(xstr) : 0; - uint16_t yres = ystr ? Maxsi::String::ToInt(ystr) : 0; - uint16_t bpp = bppstr ? Maxsi::String::ToInt(bppstr) : 32; + uint16_t xres = xstr ? atoi(xstr) : 0; + uint16_t yres = ystr ? atoi(ystr) : 0; + uint16_t bpp = bppstr ? atoi(bppstr) : 32; size_t newframesize = (size_t) xres * (size_t) yres * (size_t) bpp/8UL; // If the current resolution uses more memory than the new one, keep it @@ -340,9 +341,9 @@ bool BGADriver::Supports(const char* mode) const char* bppstr = NULL; if ( !ReadParamString(mode, "width", &xstr, "height", &ystr, "bpp", &bppstr, NULL, NULL) ) { return false; } - uint16_t xres = xstr ? Maxsi::String::ToInt(xstr) : 0; - uint16_t yres = ystr ? Maxsi::String::ToInt(ystr) : 0; - uint16_t bpp = bppstr ? Maxsi::String::ToInt(bppstr) : 0; + uint16_t xres = xstr ? atoi(xstr) : 0; + uint16_t yres = ystr ? atoi(ystr) : 0; + uint16_t bpp = bppstr ? atoi(bppstr) : 0; bool result = SupportsResolution(xres, yres, bpp); delete[] xstr; delete[] ystr;