mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
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:
committed by
Jacek Jendrzej
parent
17ea8e7d63
commit
0d9139054a
@@ -48,8 +48,8 @@ CMountChooser::CMountChooser(const neutrino_locale_t Name, const std::string & I
|
||||
for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++)
|
||||
{
|
||||
if (!g_settings.network_nfs[i].local_dir.empty() &&
|
||||
(g_settings.network_nfs[i].mount_options1.find("rw") != string::npos ||
|
||||
g_settings.network_nfs[i].mount_options2.find("rw") != string::npos))
|
||||
(g_settings.network_nfs[i].mount_options1.find("rw") != std::string::npos ||
|
||||
g_settings.network_nfs[i].mount_options2.find("rw") != std::string::npos))
|
||||
{
|
||||
std::string s = g_settings.network_nfs[i].local_dir + " (" + g_settings.network_nfs[i].ip + ":" + g_settings.network_nfs[i].dir + ")";
|
||||
snprintf(indexStr,sizeof(indexStr),"%d",i);
|
||||
|
@@ -41,6 +41,8 @@
|
||||
#define MIN_WINDOW_WIDTH (MAX_WINDOW_WIDTH>>1)
|
||||
#define MIN_WINDOW_HEIGHT 40
|
||||
|
||||
using namespace std; /* TODO: remove all std:: prefixes in this file */
|
||||
|
||||
CMsgBox::CMsgBox( const char* Text,
|
||||
const char* Title,
|
||||
const char* Icon,
|
||||
|
@@ -83,7 +83,7 @@ static int read_line(int fd, struct pollfd *fds, char *b, size_t sz)
|
||||
return i;
|
||||
}
|
||||
|
||||
static std::string lines2txt(list<std::string> &lines)
|
||||
static std::string lines2txt(std::list<std::string> &lines)
|
||||
{
|
||||
std::string txt = "";
|
||||
for (std::list<std::string>::const_iterator it = lines.begin(), end = lines.end(); it != end; ++it) {
|
||||
@@ -122,7 +122,7 @@ void CShellWindow::exec()
|
||||
int h_shell = frameBuffer->getScreenHeight();
|
||||
int w_shell = frameBuffer->getScreenWidth();
|
||||
unsigned int lines_max = h_shell / font->getHeight();
|
||||
list<std::string> lines;
|
||||
std::list<std::string> lines;
|
||||
CBox textBoxPosition(frameBuffer->getScreenX(), frameBuffer->getScreenY(), w_shell, h_shell);
|
||||
if (textBox == NULL){
|
||||
textBox = new CTextBox(cmd.c_str(), font, CTextBox::BOTTOM, &textBoxPosition);
|
||||
|
@@ -490,7 +490,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
||||
}
|
||||
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
|
||||
{
|
||||
string tmp_name = name == NONEXISTANT_LOCALE ? head : g_Locale->getText(name);
|
||||
std::string tmp_name = name == NONEXISTANT_LOCALE ? head : g_Locale->getText(name);
|
||||
if ((trim (*valueString) != trim(oldval)) &&
|
||||
(ShowMsg(tmp_name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
|
Reference in New Issue
Block a user