mirror of https://github.com/axmolengine/axmol.git
[sp v25] Don't use 'using namespace std;' to make android build happy.
This commit is contained in:
parent
541a0478ac
commit
0f7a99f898
|
@ -54,9 +54,9 @@
|
|||
|
||||
#define BYTE_CODE_FILE_EXT ".jsc"
|
||||
|
||||
static string inData;
|
||||
static string outData;
|
||||
static vector<string> g_queue;
|
||||
static std::string inData;
|
||||
static std::string outData;
|
||||
static std::vector<std::string> g_queue;
|
||||
static std::mutex g_qMutex;
|
||||
static std::mutex g_rwMutex;
|
||||
static int clientSocket = -1;
|
||||
|
@ -1964,8 +1964,8 @@ void SimpleRunLoop::update(float dt)
|
|||
while (size > 0)
|
||||
{
|
||||
g_qMutex.lock();
|
||||
vector<string>::iterator first = g_queue.begin();
|
||||
string str = *first;
|
||||
auto first = g_queue.begin();
|
||||
std::string str = *first;
|
||||
g_queue.erase(first);
|
||||
size = g_queue.size();
|
||||
g_qMutex.unlock();
|
||||
|
@ -1974,7 +1974,7 @@ void SimpleRunLoop::update(float dt)
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptingCore::debugProcessInput(string str)
|
||||
void ScriptingCore::debugProcessInput(const std::string& str)
|
||||
{
|
||||
JSAutoCompartment ac(_cx, _debugGlobal);
|
||||
|
||||
|
@ -1994,8 +1994,8 @@ static bool NS_ProcessNextEvent()
|
|||
while (size > 0)
|
||||
{
|
||||
g_qMutex.lock();
|
||||
vector<string>::iterator first = g_queue.begin();
|
||||
string str = *first;
|
||||
auto first = g_queue.begin();
|
||||
std::string str = *first;
|
||||
g_queue.erase(first);
|
||||
size = g_queue.size();
|
||||
g_qMutex.unlock();
|
||||
|
@ -2060,7 +2060,7 @@ static void _clientSocketWriteAndClearString(std::string& s)
|
|||
s.clear();
|
||||
}
|
||||
|
||||
static void processInput(string data) {
|
||||
static void processInput(const std::string& data) {
|
||||
std::lock_guard<std::mutex> lk(g_qMutex);
|
||||
g_queue.push_back(data);
|
||||
}
|
||||
|
@ -2087,7 +2087,7 @@ static void serverEntryPoint(void)
|
|||
hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
|
||||
hints.ai_flags = AI_PASSIVE; // fill in my IP for me
|
||||
|
||||
stringstream portstr;
|
||||
std::stringstream portstr;
|
||||
portstr << JSB_DEBUGGER_PORT;
|
||||
|
||||
int err = 0;
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
void js_log(const char *format, ...);
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace std;
|
||||
|
||||
typedef void (*sc_register_sth)(JSContext* cx, JSObject* global);
|
||||
|
||||
|
@ -189,7 +188,7 @@ public:
|
|||
/**
|
||||
* enable the debug environment
|
||||
*/
|
||||
void debugProcessInput(string str);
|
||||
void debugProcessInput(const std::string& str);
|
||||
void enableDebugger();
|
||||
JSObject* getDebugGlobal() { return _debugGlobal; }
|
||||
JSObject* getGlobalObject() { return _global; }
|
||||
|
@ -230,7 +229,7 @@ JSBool jsval_to_FontDefinition( JSContext *cx, jsval vp, FontDefinition* ret );
|
|||
jsval int32_to_jsval( JSContext *cx, int32_t l);
|
||||
jsval uint32_to_jsval( JSContext *cx, uint32_t number );
|
||||
jsval long_long_to_jsval(JSContext* cx, long long v);
|
||||
jsval std_string_to_jsval(JSContext* cx, const string& v);
|
||||
jsval std_string_to_jsval(JSContext* cx, const std::string& v);
|
||||
jsval c_string_to_jsval(JSContext* cx, const char* v, size_t length = -1);
|
||||
jsval ccpoint_to_jsval(JSContext* cx, const Point& v);
|
||||
jsval ccrect_to_jsval(JSContext* cx, const Rect& v);
|
||||
|
|
|
@ -105,8 +105,8 @@ private:
|
|||
network::HttpRequest* _httpRequest;
|
||||
bool _isNetwork;
|
||||
bool _withCredentialsValue;
|
||||
std::map<string, string> _httpHeader;
|
||||
std::map<string, string> _requestHeader;
|
||||
std::map<std::string, std::string> _httpHeader;
|
||||
std::map<std::string, std::string> _requestHeader;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue