From 5be9ff7b6715a661e85f99b108f96340de7ef435 Mon Sep 17 00:00:00 2001 From: George Marques Date: Fri, 1 Jan 2016 11:50:53 -0200 Subject: Update copyright to 2016 in headers --- drivers/unix/os_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 94a7b03f45..bdf7daf799 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 From cabf9234849508ba7285d1a5bafd3bab692eb80f Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Mon, 4 Jan 2016 11:46:16 +0100 Subject: Remove unnecessary null pointer checks --- drivers/unix/os_unix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index bdf7daf799..be9bfe3166 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -149,8 +149,7 @@ void OS_Unix::finalize_core() { if (mempool_dynamic) memdelete( mempool_dynamic ); - if (mempool_static) - delete mempool_static; + delete mempool_static; } -- cgit v1.2.3 From a120c66f98586138fc61fa6f243cb071d60111bc Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 10 Jan 2016 18:24:55 -0300 Subject: -Removed OS.get_system_time_msec(), this is undoable on Windows and also unusable from GDscript due to precision. -Added, instead an OS.get_system_time_secs(), which is 32 bits friendly, fixes #3143 --- drivers/unix/os_unix.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index bdf7daf799..405d84f0f1 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -233,13 +233,12 @@ uint64_t OS_Unix::get_unix_time() const { return time(NULL); }; -uint64_t OS_Unix::get_system_time_msec() const { +uint64_t OS_Unix::get_system_time_secs() const { struct timeval tv_now; gettimeofday(&tv_now, NULL); //localtime(&tv_now.tv_usec); //localtime((const long *)&tv_now.tv_usec); - uint64_t msec = uint64_t(tv_now.tv_sec)*1000+tv_now.tv_usec/1000; - return msec; + return uint64_t(tv_now.tv_sec); } -- cgit v1.2.3 From c633a29a391c8797ace9ebb838390b318e8c91a9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 13 Jan 2016 09:42:03 -0300 Subject: improve reporting of error in wrong inheritance for autoload script --- drivers/unix/os_unix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/unix/os_unix.cpp') diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 8e3fba167f..a004a116e0 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -78,11 +78,11 @@ void OS_Unix::print_error(const char* p_function,const char* p_file,int p_line,c break; case ERR_WARNING: print("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n",p_function,err_details); - print("\E[0;33m At: %s:%i.\E[0m\n",p_file,p_line); + print("\E[0;33m At: %s:%i.\E[0m\n",p_file,p_line); break; case ERR_SCRIPT: print("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n",p_function,err_details); - print("\E[0;35m At: %s:%i.\E[0m\n",p_file,p_line); + print("\E[0;35m At: %s:%i.\E[0m\n",p_file,p_line); break; } } -- cgit v1.2.3