Skip to content

Commit

Permalink
Fix clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Jan 13, 2025
1 parent a7709a8 commit 634f022
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions OgreMain/include/OgreCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -1172,9 +1172,9 @@ namespace Ogre
}

#if defined( __has_builtin )
# define OGRE_HAS_BUILTIN( x ) __has_builtin( x )
# define OGRE_HAS_BUILTIN( x ) __has_builtin( x )
#else
# define OGRE_HAS_BUILTIN( x ) 0
# define OGRE_HAS_BUILTIN( x ) 0
#endif

/// Performs the same as std::bit_cast
Expand All @@ -1192,11 +1192,11 @@ namespace Ogre
return __builtin_bit_cast( Dest, source );
#else
static_assert( sizeof( Dest ) == sizeof( Source ),
"bit_cast requires source and destination to be the same size" );
"bit_cast requires source and destination to be the same size" );
static_assert( std::is_trivially_copyable<Dest>::value,
"bit_cast requires the destination type to be copyable" );
"bit_cast requires the destination type to be copyable" );
static_assert( std::is_trivially_copyable<Source>::value,
"bit_cast requires the source type to be copyable" );
"bit_cast requires the source type to be copyable" );
Dest dest;
memcpy( &dest, &source, sizeof( dest ) );
return dest;
Expand Down
4 changes: 2 additions & 2 deletions OgreMain/src/OgreHlms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3089,12 +3089,12 @@ namespace Ogre
propName.resize( basePropSize );
propName.a( "_uv_length_x" );
setProperty( kNoTid, propName.c_str(),
bit_cast<int32_t>( (float)shadowTexDef->uvLength.x ) );
bit_cast<int32_t>( (float)shadowTexDef->uvLength.x ) );

propName.resize( basePropSize );
propName.a( "_uv_length_y" );
setProperty( kNoTid, propName.c_str(),
bit_cast<int32_t>( (float)shadowTexDef->uvLength.y ) );
bit_cast<int32_t>( (float)shadowTexDef->uvLength.y ) );

if( light->getType() == Light::LT_DIRECTIONAL )
{
Expand Down

0 comments on commit 634f022

Please sign in to comment.