Removed lots of prints

This commit is contained in:
Daniel J. Ramirez 2016-06-18 18:01:06 -05:00
parent 2ca331d959
commit 422fac5066
7 changed files with 2 additions and 34 deletions

View file

@ -44,18 +44,15 @@ void add_print_handler(PrintHandlerList *p_handler) {
void remove_print_handler(PrintHandlerList *p_handler) { void remove_print_handler(PrintHandlerList *p_handler) {
OS::get_singleton()->print("pre-removing print handler...\n");
_global_lock(); _global_lock();
PrintHandlerList *prev = NULL; PrintHandlerList *prev = NULL;
PrintHandlerList *l = print_handler_list; PrintHandlerList *l = print_handler_list;
OS::get_singleton()->print("removing print handler...\n");
while(l) { while(l) {
if (l==p_handler) { if (l==p_handler) {
OS::get_singleton()->print("found\n");
if (prev) if (prev)
prev->next=l->next; prev->next=l->next;
else else

View file

@ -124,7 +124,6 @@ Error PacketPeerUDPPosix::listen(int p_port, int p_recv_buffer_size){
close(); close();
return ERR_UNAVAILABLE; return ERR_UNAVAILABLE;
} }
printf("UDP Connection listening on port %i bufsize %i \n", p_port,p_recv_buffer_size);
rb.resize(nearest_shift(p_recv_buffer_size)); rb.resize(nearest_shift(p_recv_buffer_size));
return OK; return OK;
} }

View file

@ -67,7 +67,6 @@ void TCPServerPosix::make_default() {
Error TCPServerPosix::listen(uint16_t p_port,const List<String> *p_accepted_hosts) { Error TCPServerPosix::listen(uint16_t p_port,const List<String> *p_accepted_hosts) {
printf("********* listening on port %i\n", p_port);
int sockfd; int sockfd;
sockfd = socket(AF_INET, SOCK_STREAM, 0); sockfd = socket(AF_INET, SOCK_STREAM, 0);
ERR_FAIL_COND_V(sockfd == -1, FAILED); ERR_FAIL_COND_V(sockfd == -1, FAILED);
@ -80,8 +79,7 @@ Error TCPServerPosix::listen(uint16_t p_port,const List<String> *p_accepted_host
int reuse=1; int reuse=1;
if(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse, sizeof(reuse)) < 0) { if(setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&reuse, sizeof(reuse)) < 0) {
WARN_PRINT("REUSEADDR failed!")
printf("REUSEADDR failed!");
} }
struct sockaddr_in my_addr; struct sockaddr_in my_addr;
@ -103,14 +101,11 @@ Error TCPServerPosix::listen(uint16_t p_port,const List<String> *p_accepted_host
}; };
if (listen_sockfd != -1) { if (listen_sockfd != -1) {
printf("FAILED\n");
stop(); stop();
}; };
listen_sockfd = sockfd; listen_sockfd = sockfd;
printf("OK! %i\n", listen_sockfd);
return OK; return OK;
}; };
@ -129,7 +124,6 @@ bool TCPServerPosix::is_connection_available() const {
ERR_FAIL_COND_V(ret < 0, FAILED); ERR_FAIL_COND_V(ret < 0, FAILED);
if (ret && (pfd.revents & POLLIN)) { if (ret && (pfd.revents & POLLIN)) {
printf("has connection!\n");
return true; return true;
}; };
@ -164,7 +158,6 @@ Ref<StreamPeerTCP> TCPServerPosix::take_connection() {
void TCPServerPosix::stop() { void TCPServerPosix::stop() {
if (listen_sockfd != -1) { if (listen_sockfd != -1) {
print_line("CLOSING CONNECTION");
int ret = close(listen_sockfd); int ret = close(listen_sockfd);
ERR_FAIL_COND(ret!=0); ERR_FAIL_COND(ret!=0);
}; };

View file

@ -497,11 +497,6 @@ static Ref<Reference> _get_parent_class(GDCompletionContext& context) {
int base_idx = GDScriptLanguage::get_singleton()->get_global_map()[base]; int base_idx = GDScriptLanguage::get_singleton()->get_global_map()[base];
native = GDScriptLanguage::get_singleton()->get_global_array()[base_idx]; native = GDScriptLanguage::get_singleton()->get_global_array()[base_idx];
if (!native.is_valid()) {
print_line("Global not a class: '"+base+"'");
}
return native; return native;
} }
@ -2124,10 +2119,8 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
switch(p.get_completion_type()) { switch(p.get_completion_type()) {
case GDParser::COMPLETION_NONE: { case GDParser::COMPLETION_NONE: {
print_line("No completion");
} break; } break;
case GDParser::COMPLETION_BUILT_IN_TYPE_CONSTANT: { case GDParser::COMPLETION_BUILT_IN_TYPE_CONSTANT: {
print_line("Built in type constant");
List<StringName> constants; List<StringName> constants;
Variant::get_numeric_constants_for_type(p.get_completion_built_in_constant(),&constants); Variant::get_numeric_constants_for_type(p.get_completion_built_in_constant(),&constants);
for(List<StringName>::Element *E=constants.front();E;E=E->next()) { for(List<StringName>::Element *E=constants.front();E;E=E->next()) {
@ -2143,7 +2136,6 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
_find_identifiers(context,p.get_completion_line(),isfunction,options); _find_identifiers(context,p.get_completion_line(),isfunction,options);
} break; } break;
case GDParser::COMPLETION_PARENT_FUNCTION: { case GDParser::COMPLETION_PARENT_FUNCTION: {
print_line("parent function");
} break; } break;
case GDParser::COMPLETION_METHOD: case GDParser::COMPLETION_METHOD:

View file

@ -1159,7 +1159,6 @@ void EditorNode::_dialog_action(String p_file) {
} break; } break;
case FILE_RUN_SCRIPT: { case FILE_RUN_SCRIPT: {
print_line("RUN: "+p_file);
Ref<Script> scr = ResourceLoader::load(p_file,"Script",true); Ref<Script> scr = ResourceLoader::load(p_file,"Script",true);
if (scr.is_null()) { if (scr.is_null()) {
add_io_error("Script Failed to Load:\n"+p_file); add_io_error("Script Failed to Load:\n"+p_file);
@ -1303,7 +1302,6 @@ void EditorNode::_dialog_action(String p_file) {
ret = unzGoToFirstFile(pkg); ret = unzGoToFirstFile(pkg);
EditorProgress p("ltask",TTR("Loading Export Templates"),fc); EditorProgress p("ltask",TTR("Loading Export Templates"),fc);
print_line("BEGIN IMPORT");
fc=0; fc=0;
@ -1333,7 +1331,6 @@ void EditorNode::_dialog_action(String p_file) {
file=file.get_file(); file=file.get_file();
p.step(TTR("Importing:")+" "+file,fc); p.step(TTR("Importing:")+" "+file,fc);
print_line("IMPORT "+file);
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE); FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE);
@ -3552,7 +3549,6 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
load_errors->clear(); load_errors->clear();
String lpath = Globals::get_singleton()->localize_path(p_scene); String lpath = Globals::get_singleton()->localize_path(p_scene);
print_line("LOCAL PATH: "+lpath+" from "+p_scene);
if (!lpath.begins_with("res://")) { if (!lpath.begins_with("res://")) {
current_option=-1; current_option=-1;
@ -4199,7 +4195,6 @@ void EditorNode::_dock_select_input(const InputEvent& p_input) {
dock_slot[dock_popup_selected]->set_current_tab(0); dock_slot[dock_popup_selected]->set_current_tab(0);
} }
print_line("performing reparent");
dock_slot[nrect]->add_child(dock); dock_slot[nrect]->add_child(dock);
dock_popup_selected=nrect; dock_popup_selected=nrect;
dock_slot[nrect]->set_current_tab(dock_slot[nrect]->get_tab_count()-1); dock_slot[nrect]->set_current_tab(dock_slot[nrect]->get_tab_count()-1);
@ -5173,7 +5168,6 @@ EditorNode::EditorNode() {
EditorSettings::create(); EditorSettings::create();
{ {
int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode"); int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode");
print_line("DPI MODE: "+itos(dpi_mode));
if (dpi_mode==0) { if (dpi_mode==0) {
editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 ); editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 );
} else if (dpi_mode==2) { } else if (dpi_mode==2) {

View file

@ -63,7 +63,6 @@ bool EditorSettings::_set(const StringName& p_name, const Variant& p_value) {
Array arr=p_value; Array arr=p_value;
ERR_FAIL_COND_V(arr.size() && arr.size()&1,true); ERR_FAIL_COND_V(arr.size() && arr.size()&1,true);
print_line("shortcuts: "+Variant(arr).get_construct_string());
for(int i=0;i<arr.size();i+=2) { for(int i=0;i<arr.size();i+=2) {
String name = arr[i]; String name = arr[i];
@ -399,14 +398,11 @@ String EditorSettings::get_settings_path() const {
void EditorSettings::setup_language() { void EditorSettings::setup_language() {
String lang = get("global/editor_language"); String lang = get("global/editor_language");
print_line("LANG IS "+lang);
if (lang=="en") if (lang=="en")
return; //none to do return; //none to do
for(int i=0;i<translations.size();i++) { for(int i=0;i<translations.size();i++) {
print_line("TESTING "+translations[i]->get_locale());
if (translations[i]->get_locale()==lang) { if (translations[i]->get_locale()==lang) {
print_line("ok translation");
TranslationServer::get_singleton()->set_tool_translation(translations[i]); TranslationServer::get_singleton()->set_tool_translation(translations[i]);
break; break;
} }
@ -711,7 +707,6 @@ void EditorSettings::notify_changes() {
sml = OS::get_singleton()->get_main_loop()->cast_to<SceneTree>(); sml = OS::get_singleton()->get_main_loop()->cast_to<SceneTree>();
if (!sml) { if (!sml) {
print_line("not SML");
return; return;
} }

View file

@ -2201,7 +2201,7 @@ void ScriptEditor::_editor_stop() {
void ScriptEditor::_add_callback(Object *p_obj, const String& p_function, const StringArray& p_args) { void ScriptEditor::_add_callback(Object *p_obj, const String& p_function, const StringArray& p_args) {
print_line("add callback! hohoho"); //print_line("add callback! hohoho"); kinda sad to remove this
ERR_FAIL_COND(!p_obj); ERR_FAIL_COND(!p_obj);
Ref<Script> script = p_obj->get_script(); Ref<Script> script = p_obj->get_script();
ERR_FAIL_COND( !script.is_valid() ); ERR_FAIL_COND( !script.is_valid() );
@ -2243,7 +2243,6 @@ void ScriptEditor::_add_callback(Object *p_obj, const String& p_function, const
void ScriptEditor::_editor_settings_changed() { void ScriptEditor::_editor_settings_changed() {
print_line("settings changed");
trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/trim_trailing_whitespace_on_save"); trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/trim_trailing_whitespace_on_save");
float autosave_time = EditorSettings::get_singleton()->get("text_editor/autosave_interval_secs"); float autosave_time = EditorSettings::get_singleton()->get("text_editor/autosave_interval_secs");
if (autosave_time>0) { if (autosave_time>0) {
@ -2284,7 +2283,6 @@ void ScriptEditor::_editor_settings_changed() {
void ScriptEditor::_autosave_scripts() { void ScriptEditor::_autosave_scripts() {
print_line("autosaving");
save_all_scripts(); save_all_scripts();
} }