Skip to content

Commit

Permalink
Linux build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberatorUSA committed Aug 10, 2024
1 parent 993d0ff commit a3b1469
Show file tree
Hide file tree
Showing 13 changed files with 800 additions and 797 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ dependencies/android-ndk-r21d/
projects/Android/obj/
projects/Android/libs/
projects/k3s/github/vanvelzen-github-runner-base-latest.tar
projects/k3s/github/github_runner_auth.yaml
projects/k3s/metrics/statsite
.vs/slnx.sqlite
tools/Kaitai/kaitai-struct-compiler*.deb
.vs/
Expand Down
22 changes: 11 additions & 11 deletions platform/gucefCORE/include/gucefCORE_CTMailboxForSharedCloneables.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class CTMailboxForSharedCloneables : public MT::CMailboxForCloneables
*/
bool ReInsertSPtrBulkMail( TMailSPtrList& mailList ,
bool bestEffortSkipIfNeeded = true );

private:

CTMailboxForSharedCloneables( const CTMailboxForSharedCloneables& src ); /**< not implemented */
Expand All @@ -127,7 +127,7 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::CTMailboxForSharedCl
}

/*-------------------------------------------------------------------------*/

template< typename CloneableType, class PtrLockType >
CTMailboxForSharedCloneables< CloneableType, PtrLockType >::~CTMailboxForSharedCloneables()
{GUCEF_TRACE;
Expand All @@ -149,7 +149,7 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::GetMailSPtr( TMailSP
mail = TMailSPtr( static_cast< CloneableType* >( m_mailQueue.front() ) );
m_mailQueue.pop_front();
return true;
}
}
return false;
}

Expand All @@ -165,9 +165,9 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::GetSPtrBulkMail( TMa

if ( m_mailQueue.empty() )
return false; // nothing to read, early out

// We know how many mail items we will read so lets not perform unnessesary reallocs of the vector's underlying memory
if ( maxMailItems > 0 )
if ( maxMailItems > 0 )
{
size_t itemsToRead = GUCEF_SMALLEST( m_mailQueue.size(), (size_t) maxMailItems );
mailList.reserve( itemsToRead );
Expand All @@ -176,7 +176,7 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::GetSPtrBulkMail( TMa
{
mailList.reserve( m_mailQueue.size() );
}

Int32 mailItemsRead = 0;
while ( mailItemsRead < maxMailItems || maxMailItems < 0 )
{
Expand All @@ -187,15 +187,15 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::GetSPtrBulkMail( TMa
CICloneable* clonable = m_mailQueue.front();
CloneableType* derivedClonable = static_cast< CloneableType* >( clonable );
TMailSPtr objPtr( derivedClonable );
mailList.push_back( objPtr );
mailList.push_back( objPtr );
GUCEF_ASSERT( objPtr.GetPointerAlways() == static_cast< CloneableType* >( m_mailQueue.front() ) );
m_mailQueue.pop_front();

#else
mailList.push_back( TMailSPtr( static_cast< CloneableType* >( m_mailQueue.front() ) ) );

mailList.push_back( TMailSPtr( static_cast< CloneableType* >( m_mailQueue.front() ) ) );
m_mailQueue.pop_front();

#endif

++mailItemsRead;
Expand All @@ -220,7 +220,7 @@ CTMailboxForSharedCloneables< CloneableType, PtrLockType >::ReInsertSPtrBulkMail
MT::CObjectScopeLock lock( this );

bool errorOccured = false;
TMailSPtrList::iterator i = mailList.begin();
typename TMailSPtrList::iterator i = mailList.begin();
while ( i != mailList.end() )
{
// Note that this only works if the shared pointer holds the last remaining reference
Expand Down
6 changes: 3 additions & 3 deletions platform/gucefKAITAI/ModuleInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<Dependency Name="gucefHeaders" />
<Dependency Name="gucefMT" />
<Dependency Name="gucefCORE" />
<Dependency Name="gucefVFS" />
<Dependency Name="gucefVFS" />
</Dependencies>
<Linker>
<Dependency Name="gucefMT" />
<Dependency Name="gucefCORE" />
<Dependency Name="gucefVFS" />
<Dependency Name="gucefVFS" />
</Linker>
<Preprocessor>
<Define String="GUCEF_KAITAI_BUILD_MODULE" />
</Preprocessor>
</Module>
</ModuleInfoEntry>
</ModuleInfoEntry>
Loading

0 comments on commit a3b1469

Please sign in to comment.