Skip to content

Instantly share code, notes, and snippets.

@giraphics
giraphics / uniquePtrCustomDeleter.cpp
Created October 19, 2019 05:31
Unique Pointer CustomDeleter
template <class T>
struct GfxCircularQueueDefaultDeleter
{
void operator()(T* p_Buffer) const
{
LOG_INFO("Circlular queue array deleted, queue is empty now....");
delete p_Buffer;
}
};
@giraphics
giraphics / uniquePtrCustomDeleter.cpp
Created October 19, 2019 05:32
Unique Pointer CustomDeleter
template <class T>
struct GfxCircularQueueDefaultDeleter
{
void operator()(T* p_Buffer) const
{
LOG_INFO("Circlular queue array deleted, queue is empty now....");
delete p_Buffer;
}
};
@giraphics
giraphics / gist:f0573cfd41d90ba7ff8f55da4286df70
Created December 1, 2019 04:04
How to merge two “ar” static libraries into one?
######################################################################################################
# You can extract the object from both the .a files and create your .a file using the extracted .os: #
######################################################################################################
# Make a .tmp directory where we will extract our .o file later we delete this dir
mkdir .tmp
cd .tmp
ar -x ../libBMDGfx.a
ar -x ../Graphics/3rdParty/FontSupport/harfbuzz-master/build/libharfbuzz.a
ar -rc ../libGfx.a *.o