mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 14:07:35 +08:00
refs #308 lobby client
This commit is contained in:
@@ -17,6 +17,33 @@ namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fs9
|
||||
{
|
||||
//! Safely release a COM allocated object
|
||||
template <class T>
|
||||
void SafeRelease(T*& pT)
|
||||
{
|
||||
if (pT)
|
||||
pT->Release();
|
||||
pT = nullptr;
|
||||
}
|
||||
|
||||
//! Safely delete an allocated pointer
|
||||
template <class T>
|
||||
void SafeDelete(T*& pT)
|
||||
{
|
||||
if( pT != nullptr )
|
||||
delete pT;
|
||||
pT = nullptr;
|
||||
}
|
||||
|
||||
//! Safely delete an allocated array
|
||||
template <class T>
|
||||
void SafeDeleteArray(T*& pT)
|
||||
{
|
||||
if(pT)
|
||||
delete[] pT;
|
||||
pT = nullptr;
|
||||
}
|
||||
|
||||
//! Register all relevant metadata in BlackMisc
|
||||
void registerMetadata();
|
||||
|
||||
@@ -29,6 +56,8 @@ namespace BlackSimPlugin
|
||||
double updateInterval);
|
||||
|
||||
HRESULT printDirectPlayError(HRESULT error);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user