Skip to content

Commit

Permalink
Add proper std prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Oct 29, 2024
1 parent f484f37 commit 80fb9b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <cctype>
#include <cstring>
#include <cmath>

#include <iostream>
#include <iomanip>
Expand Down Expand Up @@ -124,7 +125,7 @@ const char *ConsolePlayer::getNote(uint16_t freq)
int distance = 0xffff;
for (int i=0; i<(12 * 8); i++)
{
int d = abs(freq - m_freqTable[i]);
int d = std::abs(freq - m_freqTable[i]);
if (d < distance)
distance = d;
else
Expand Down Expand Up @@ -443,7 +444,7 @@ void ConsolePlayer::menu ()
consoleTable (table_t::middle);
consoleColour (color_t::magenta, true);
cerr << " Kernal ROM : ";
if (strlen(romDesc) == 0)
if (std::strlen(romDesc) == 0)
{
consoleColour (color_t::red, false);
cerr << "None - Some tunes may not play!";
Expand All @@ -460,7 +461,7 @@ void ConsolePlayer::menu ()
consoleTable (table_t::middle);
consoleColour (color_t::magenta, true);
cerr << " BASIC ROM : ";
if (strlen(romDesc) == 0)
if (std::strlen(romDesc) == 0)
{
consoleColour (color_t::red, false);
cerr << "None - Basic tunes will not play!";
Expand All @@ -477,7 +478,7 @@ void ConsolePlayer::menu ()
consoleTable (table_t::middle);
consoleColour (color_t::magenta, true);
cerr << " Chargen ROM : ";
if (strlen(romDesc) == 0)
if (std::strlen(romDesc) == 0)
{
consoleColour (color_t::red, false);
cerr << "None";
Expand Down
4 changes: 2 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ SID_STRING utils::getPath(const char* id, const char* def)
{
SID_STRING returnPath;

char *path = getenv(id);
char *path = std::getenv(id);
if (!path)
{
path = getenv("HOME");
path = std::getenv("HOME");
if (!path)
throw error();
returnPath.append(path).append(def);
Expand Down

0 comments on commit 80fb9b9

Please sign in to comment.