mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
removed using namespace std
This commit is contained in:
parent
7735639e57
commit
273cb928bf
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@ -72,6 +71,7 @@ EQEMuLog::~EQEMuLog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool EQEMuLog::open(LogIDs id) {
|
bool EQEMuLog::open(LogIDs id) {
|
||||||
|
|
||||||
if (!logFileValid) {
|
if (!logFileValid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ bool EQEMuLog::open(LogIDs id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
string filename = FileNames[id];
|
std::string filename = FileNames[id];
|
||||||
|
|
||||||
const EQEmuExePlatform &platform = GetExecutablePlatform();
|
const EQEmuExePlatform &platform = GetExecutablePlatform();
|
||||||
|
|
||||||
@ -109,12 +109,12 @@ bool EQEMuLog::open(LogIDs id) {
|
|||||||
// According to http://msdn.microsoft.com/en-us/library/vstudio/ee404875(v=vs.100).aspx
|
// According to http://msdn.microsoft.com/en-us/library/vstudio/ee404875(v=vs.100).aspx
|
||||||
// Visual Studio 2010 doesn't have std::to_string(int) but it does have one for
|
// Visual Studio 2010 doesn't have std::to_string(int) but it does have one for
|
||||||
// long long. Oh well, it works fine and formats perfectly acceptably.
|
// long long. Oh well, it works fine and formats perfectly acceptably.
|
||||||
filename.append(to_string((long long)getpid()));
|
filename.append(std::to_string((long long)getpid()));
|
||||||
#endif
|
#endif
|
||||||
filename.append(".log");
|
filename.append(".log");
|
||||||
fp[id] = fopen(filename.c_str(), "a");
|
fp[id] = fopen(filename.c_str(), "a");
|
||||||
if (!fp[id]) {
|
if (!fp[id]) {
|
||||||
cerr << "Failed to open log file: " << filename << endl;
|
std::cerr << "Failed to open log file: " << filename << std::endl;
|
||||||
pLogStatus[id] |= 4; // set file state to error
|
pLogStatus[id] |= 4; // set file state to error
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -328,6 +328,7 @@ bool EQEMuLog::writeNTS(LogIDs id, bool dofile, const char *fmt, ...) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool EQEMuLog::Dump(LogIDs id, uint8* data, uint32 size, uint32 cols, uint32 skip) {
|
bool EQEMuLog::Dump(LogIDs id, uint8* data, uint32 size, uint32 cols, uint32 skip) {
|
||||||
|
|
||||||
if (!logFileValid) {
|
if (!logFileValid) {
|
||||||
#if EQDEBUG >= 10
|
#if EQDEBUG >= 10
|
||||||
cerr << "Error: Dump() from null pointer"<<endl;
|
cerr << "Error: Dump() from null pointer"<<endl;
|
||||||
@ -375,7 +376,7 @@ bool EQEMuLog::Dump(LogIDs id, uint8* data, uint32 size, uint32 cols, uint32 ski
|
|||||||
// According to http://msdn.microsoft.com/en-us/library/vstudio/ee404875(v=vs.100).aspx
|
// According to http://msdn.microsoft.com/en-us/library/vstudio/ee404875(v=vs.100).aspx
|
||||||
// Visual Studio 2010 doesn't have std::to_string(int) but it does have the long long
|
// Visual Studio 2010 doesn't have std::to_string(int) but it does have the long long
|
||||||
// version.
|
// version.
|
||||||
asciiOutput.append(to_string((long long)data[indexInData]));
|
asciiOutput.append(std::to_string((long long)data[indexInData]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user