Skip to content

Commit

Permalink
[iOS] Fix build with warnings=extra.
Browse files Browse the repository at this point in the history
(cherry picked from commit 987723b)
  • Loading branch information
bruvzg authored and Stary2001 committed Mar 2, 2023
1 parent 698db43 commit 1ae5870
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/io/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include "core/os/dir_access.h"
#include "core/os/os.h"
#include "core/os/time.h"
#include "core/print_string.h"
#include "core/project_settings.h"

Expand Down Expand Up @@ -169,11 +170,7 @@ void RotatedFileLogger::rotate_file() {

if (FileAccess::exists(base_path)) {
if (max_files > 1) {
char timestamp[21];
OS::Date date = OS::get_singleton()->get_date();
OS::Time time = OS::get_singleton()->get_time();
sprintf(timestamp, "_%04d-%02d-%02d_%02d.%02d.%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);

String timestamp = Time::get_singleton()->get_datetime_string_from_system().replace(":", ".");
String backup_name = base_path.get_basename() + timestamp;
if (base_path.get_extension() != String()) {
backup_name += "." + base_path.get_extension();
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/bullet_types_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@
#include "core/math/vector3.h"
#include "core/typedefs.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <LinearMath/btMatrix3x3.h>
#include <LinearMath/btTransform.h>
#include <LinearMath/btVector3.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/collision_object_bullet.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@
#include "core/vset.h"
#include "shape_owner_bullet.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <LinearMath/btTransform.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/constraint_bullet.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,17 @@
#include "bullet_utilities.h"
#include "rid_bullet.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <BulletDynamics/ConstraintSolver/btTypedConstraint.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/godot_collision_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@

#include "core/int_types.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <btBulletDynamicsCommon.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/godot_ray_world_algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,19 @@
#ifndef GODOT_RAY_WORLD_ALGORITHM_H
#define GODOT_RAY_WORLD_ALGORITHM_H

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h>
#include <BulletCollision/CollisionDispatch/btCollisionCreateFunc.h>
#include <BulletCollision/CollisionDispatch/btCollisionDispatcher.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/godot_result_callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@

#include "servers/physics_server.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <BulletCollision/BroadphaseCollision/btBroadphaseProxy.h>
#include <btBulletDynamicsCommon.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down
9 changes: 9 additions & 0 deletions modules/bullet/shape_bullet.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@
#include "rid_bullet.h"
#include "servers/physics_server.h"

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy"
#endif

#include <LinearMath/btAlignedObjectArray.h>
#include <LinearMath/btScalar.h>
#include <LinearMath/btVector3.h>

#if defined(__clang__) && (__clang_major__ >= 13)
#pragma clang diagnostic pop
#endif

/**
@author AndreaCatania
*/
Expand Down

0 comments on commit 1ae5870

Please sign in to comment.