From 52466d57e9c2897c40698a09482e5e7de230368f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 24 Aug 2018 09:35:07 +0200 Subject: Make some debug prints verbose-only, remove others --- editor/fileserver/editor_file_server.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'editor/fileserver') diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp index b9e0c7d0fa..28b1095256 100644 --- a/editor/fileserver/editor_file_server.cpp +++ b/editor/fileserver/editor_file_server.cpp @@ -34,9 +34,10 @@ #include "io/marshalls.h" //#define DEBUG_PRINT(m_p) print_line(m_p) -#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); +//#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); -//#define DEBUG_TIME(m_what) +#define DEBUG_PRINT(m_what) +#define DEBUG_TIME(m_what) void EditorFileServer::_close_client(ClientData *cd) { @@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) { //wait for ID err = cd->connection->get_data(buf4, 4); - //#define DEBUG_PRINT(m_p) print_line(m_p) DEBUG_TIME("get_data") if (err != OK) { @@ -150,13 +150,13 @@ void EditorFileServer::_subthread_start(void *s) { s.parse_utf8(fileutf8.ptr()); if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) { - print_line("FILE EXISTS: " + s); + DEBUG_PRINT("FILE EXISTS: " + s); } if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) { - print_line("MOD TIME: " + s); + DEBUG_PRINT("MOD TIME: " + s); } if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) { - print_line("OPEN: " + s); + DEBUG_PRINT("OPEN: " + s); } if (!s.begins_with("res://")) { @@ -243,7 +243,7 @@ void EditorFileServer::_subthread_start(void *s) { int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen); ERR_CONTINUE(read < 0); - print_line("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); + DEBUG_PRINT("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); //not found, continue encode_uint32(id, buf4); @@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) { } break; case FileAccessNetwork::COMMAND_CLOSE: { - print_line("CLOSED"); + DEBUG_PRINT("CLOSED"); ERR_CONTINUE(!cd->files.has(id)); memdelete(cd->files[id]); cd->files.erase(id); -- cgit v1.2.3