Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (MSVC OR APPLE)
add_link_options(-fsanitize=address -fsanitize-address-use-after-scope -fsanitize=undefined)
endif()
else()
if(MSVC AND PROJECT_IS_TOP_LEVEL)
if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND PROJECT_IS_TOP_LEVEL)
# enable hot reloading
add_compile_options("$<$<CONFIG:Debug>:/ZI>")
add_link_options("$<$<CONFIG:Debug>:/INCREMENTAL>")
Expand Down
2 changes: 1 addition & 1 deletion benchmark/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string.h>

#if defined( _WIN64 )
#include <windows.h>
#include <Windows.h>
#elif defined( __APPLE__ )
#include <unistd.h>
#elif defined( __linux__ )
Expand Down
2 changes: 1 addition & 1 deletion include/box2d/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ typedef struct b2PrismaticJointDef
} b2PrismaticJointDef;

/// Use this to initialize your joint definition
/// @ingroupd prismatic_joint
/// @ingroup prismatic_joint
B2_API b2PrismaticJointDef b2DefaultPrismaticJointDef( void );

/// Revolute joint definition
Expand Down
6 changes: 4 additions & 2 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "core.h"

#include "constants.h"

#if defined( B2_COMPILER_MSVC )
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
Expand Down Expand Up @@ -51,7 +53,7 @@ static int b2DefaultAssertFcn( const char* condition, const char* fileName, int
return 1;
}

b2AssertFcn* b2AssertHandler = b2DefaultAssertFcn;
static b2AssertFcn* b2AssertHandler = b2DefaultAssertFcn;

void b2SetAssertFcn( b2AssertFcn* assertFcn )
{
Expand All @@ -78,7 +80,7 @@ b2Version b2GetVersion( void )
static b2AllocFcn* b2_allocFcn = NULL;
static b2FreeFcn* b2_freeFcn = NULL;

b2AtomicInt b2_byteCount;
static b2AtomicInt b2_byteCount;

void b2SetAllocator( b2AllocFcn* allocFcn, b2FreeFcn* freeFcn )
{
Expand Down
2 changes: 1 addition & 1 deletion src/motor_joint.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void b2SolveMotorJoint( b2JointSim* base, b2StepContext* context )
}

// angular velocity
if ( joint->maxVelocityTorque > 0.0 )
if ( joint->maxVelocityTorque > 0.0f )
{
float cdot = wB - wA - joint->angularVelocity;
float impulse = -joint->angularMass * cdot;
Expand Down
6 changes: 3 additions & 3 deletions src/physics_world.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

_Static_assert( B2_MAX_WORLDS > 0, "must be 1 or more" );
_Static_assert( B2_MAX_WORLDS < UINT16_MAX, "B2_MAX_WORLDS limit exceeded" );
b2World b2_worlds[B2_MAX_WORLDS];
static b2World b2_worlds[B2_MAX_WORLDS];

B2_ARRAY_SOURCE( b2BodyMoveEvent, b2BodyMoveEvent )
B2_ARRAY_SOURCE( b2ContactBeginTouchEvent, b2ContactBeginTouchEvent )
Expand Down Expand Up @@ -1747,10 +1747,10 @@ void b2World_DumpMemoryStats( b2WorldId worldId )
fprintf( file, "kinematic tree: %d\n", b2DynamicTree_GetByteCount( world->broadPhase.trees + b2_kinematicBody ) );
fprintf( file, "dynamic tree: %d\n", b2DynamicTree_GetByteCount( world->broadPhase.trees + b2_dynamicBody ) );
b2HashSet* moveSet = &world->broadPhase.moveSet;
fprintf( file, "moveSet: %d (%d, %d)\n", b2GetHashSetBytes( moveSet ), moveSet->count, moveSet->capacity );
fprintf( file, "moveSet: %d (%u, %u)\n", b2GetHashSetBytes( moveSet ), moveSet->count, moveSet->capacity );
fprintf( file, "moveArray: %d\n", b2IntArray_ByteCount( &world->broadPhase.moveArray ) );
b2HashSet* pairSet = &world->broadPhase.pairSet;
fprintf( file, "pairSet: %d (%d, %d)\n", b2GetHashSetBytes( pairSet ), pairSet->count, pairSet->capacity );
fprintf( file, "pairSet: %d (%u, %u)\n", b2GetHashSetBytes( pairSet ), pairSet->count, pairSet->capacity );
fprintf( file, "\n" );

// solver sets
Expand Down
2 changes: 1 addition & 1 deletion src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define WIN32_LEAN_AND_MEAN 1
#endif

#include <windows.h>
#include <Windows.h>

static double s_invFrequency = 0.0;

Expand Down