remove "using namespace std" from header files

"using namespace std" in headers is considered bad practice, so move it
either into the respective cpp files or (for files which have lots of
other std::xxx usage anyway) just write it out explicitly.
Looking at the headers and the affected cpp files, one can actually see
why it is bad practice, as it's spreading very far ;-)
This commit is contained in:
Stefan Seyfried
2017-10-01 14:12:55 +02:00
committed by Jacek Jendrzej
parent 17ea8e7d63
commit 0d9139054a
37 changed files with 60 additions and 68 deletions

View File

@@ -200,11 +200,11 @@ void CInfoViewer::start ()
2 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight() + 25;
infoViewerBB->Init();
ChanWidth = max(125, 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getMaxDigitWidth() + 10);
ChanWidth = std::max(125, 4 * g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getMaxDigitWidth() + 10);
ChanHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_NUMBER]->getHeight()/* * 9/8*/;
ChanHeight += g_SignalFont->getHeight()/2;
ChanHeight = max(75, ChanHeight);
ChanHeight = std::max(75, ChanHeight);
numbox_offset = 3;
BoxStartX = g_settings.screen_StartX + 10;
@@ -216,7 +216,7 @@ void CInfoViewer::start ()
ChanInfoX = BoxStartX + (ChanWidth / 3);
initClock();
time_height = max(ChanHeight / 2, clock->getHeight());
time_height = std::max(ChanHeight / 2, clock->getHeight());
time_width = clock->getWidth();
}
@@ -2115,8 +2115,8 @@ void CInfoViewer::showInfoFile()
}
//get text from file and set it to info object, exit and delete object if failed
string old_txt = infobar_txt->getText();
string new_txt = infobar_txt->getTextFromFile(infobar_file);
std::string old_txt = infobar_txt->getText();
std::string new_txt = infobar_txt->getTextFromFile(infobar_file);
bool has_text = infobar_txt->setText(new_txt, CTextBox::CENTER, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]);
if (new_txt.empty()){
killInfobarText();