mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +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 ;-)
Origin commit data
------------------
Branch: ni/coolstream
Commit: aa240a9457
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-10-01 (Sun, 01 Oct 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -133,11 +133,11 @@ int CHDDMenuHandler::filterDevName(const char * name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static string readlink(const char *path)
|
||||
static std::string readlink(const char *path)
|
||||
{
|
||||
char link[PATH_MAX + 1];
|
||||
if (realpath(path, link))
|
||||
return string(link);
|
||||
return std::string(link);
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ bool CHDDMenuHandler::is_mounted(const char *dev)
|
||||
snprintf(devpath, sizeof(devpath), "/dev/%s", dev);
|
||||
|
||||
char buffer[255];
|
||||
string realdev = readlink(devpath);
|
||||
std::string realdev = readlink(devpath);
|
||||
realdev = trim(realdev);
|
||||
FILE *f = fopen("/proc/mounts", "r");
|
||||
if(f) {
|
||||
@@ -164,7 +164,7 @@ bool CHDDMenuHandler::is_mounted(const char *dev)
|
||||
if (!strcmp(buffer, devpath)) /* default '/dev/sda1' mount */
|
||||
res = true;
|
||||
else { /* now the case of '/dev/disk/by-label/myharddrive' mounts */
|
||||
string realmount = readlink(buffer);
|
||||
std::string realmount = readlink(buffer);
|
||||
if (realdev == trim(realmount))
|
||||
res = true;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ void CHDDMenuHandler::check_kernel_fs()
|
||||
if (! tab) /* should not happen in any kernel I have seen */
|
||||
continue;
|
||||
tab++;
|
||||
kernel_fs_list.insert(string(tab));
|
||||
kernel_fs_list.insert(std::string(tab));
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
@@ -418,7 +418,7 @@ void CHDDMenuHandler::setRecordPath(std::string &dev)
|
||||
return;
|
||||
}
|
||||
/* don't annoy if the recordingdir is a symlink pointing to the 'right' location */
|
||||
string readl = readlink(g_settings.network_nfs_recordingdir.c_str());
|
||||
std::string readl = readlink(g_settings.network_nfs_recordingdir.c_str());
|
||||
readl = trim(readl);
|
||||
if (newpath.compare(readl) == 0) {
|
||||
printf("CHDDMenuHandler::%s: recordingdir is a symlink to %s\n",
|
||||
|
Reference in New Issue
Block a user