screensaver: moving "using namespace std;" to cpp ...

... to avoid the inheritance of this


Origin commit data
------------------
Branch: ni/coolstream
Commit: 5f42845160
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-12-28 (Sun, 28 Dec 2014)

Origin message was:
------------------
- screensaver: moving "using namespace std;" to cpp ...

 ... to avoid the inheritance of this


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2014-12-28 21:55:32 +01:00
parent 6e7b34a27d
commit 09dd6563ef
2 changed files with 5 additions and 6 deletions

View File

@@ -32,7 +32,7 @@
#include <global.h> #include <global.h>
#include <neutrino.h> #include <neutrino.h>
#include <pthread.h> #include <pthread.h>
#include <algorithm> // std::sort #include <algorithm> // sort
#include <ctype.h> #include <ctype.h>
#include "audiomute.h" #include "audiomute.h"
#include "screensaver.h" #include "screensaver.h"
@@ -40,6 +40,7 @@
#include <video.h> #include <video.h>
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
using namespace std;
CScreenSaver::CScreenSaver() CScreenSaver::CScreenSaver()
{ {
@@ -130,11 +131,11 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
bool CScreenSaver::ReadDir() bool CScreenSaver::ReadDir()
{ {
std::string d = g_settings.screensaver_dir; string d = g_settings.screensaver_dir;
if (d.length() > 1) if (d.length() > 1)
{ {
//remove trailing slash //remove trailing slash
std::string::iterator it = d.end() - 1; string::iterator it = d.end() - 1;
if (*it == '/') if (*it == '/')
d.erase(it); d.erase(it);
} }
@@ -177,7 +178,7 @@ bool CScreenSaver::ReadDir()
str += "/"; str += "/";
str += (*dirpointer).d_name; str += (*dirpointer).d_name;
if ((std::string) dir_name == DATADIR "/neutrino/icons") if ((string) dir_name == DATADIR "/neutrino/icons")
{ {
/* /*
backward compatiblity: backward compatiblity:

View File

@@ -29,8 +29,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
using namespace std;
class CScreenSaver class CScreenSaver
{ {
private: private: