You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -30,15 +30,15 @@
|
||||
#include "os/os.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static PrintHandlerList *print_handler_list=NULL;
|
||||
bool _print_line_enabled=true;
|
||||
static PrintHandlerList *print_handler_list = NULL;
|
||||
bool _print_line_enabled = true;
|
||||
bool _print_error_enabled = true;
|
||||
|
||||
void add_print_handler(PrintHandlerList *p_handler) {
|
||||
|
||||
_global_lock();
|
||||
p_handler->next=print_handler_list;
|
||||
print_handler_list=p_handler;
|
||||
p_handler->next = print_handler_list;
|
||||
print_handler_list = p_handler;
|
||||
_global_unlock();
|
||||
}
|
||||
|
||||
@@ -49,43 +49,39 @@ void remove_print_handler(PrintHandlerList *p_handler) {
|
||||
PrintHandlerList *prev = NULL;
|
||||
PrintHandlerList *l = print_handler_list;
|
||||
|
||||
while(l) {
|
||||
while (l) {
|
||||
|
||||
if (l==p_handler) {
|
||||
if (l == p_handler) {
|
||||
|
||||
if (prev)
|
||||
prev->next=l->next;
|
||||
prev->next = l->next;
|
||||
else
|
||||
print_handler_list=l->next;
|
||||
print_handler_list = l->next;
|
||||
break;
|
||||
}
|
||||
prev=l;
|
||||
l=l->next;
|
||||
|
||||
prev = l;
|
||||
l = l->next;
|
||||
}
|
||||
//OS::get_singleton()->print("print handler list is %p\n",print_handler_list);
|
||||
|
||||
ERR_FAIL_COND(l==NULL);
|
||||
ERR_FAIL_COND(l == NULL);
|
||||
_global_unlock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void print_line(String p_string) {
|
||||
|
||||
if (!_print_line_enabled)
|
||||
return;
|
||||
|
||||
OS::get_singleton()->print("%s\n",p_string.utf8().get_data());
|
||||
OS::get_singleton()->print("%s\n", p_string.utf8().get_data());
|
||||
|
||||
_global_lock();
|
||||
PrintHandlerList *l = print_handler_list;
|
||||
while(l) {
|
||||
while (l) {
|
||||
|
||||
l->printfunc(l->userdata,p_string);
|
||||
l=l->next;
|
||||
l->printfunc(l->userdata, p_string);
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
_global_unlock();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user