1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Hide the use of new in factory functions for BlockFiles

This commit is contained in:
Paul Licameli
2016-08-13 12:59:19 -04:00
parent 2ede67be96
commit e7b4d935a5
10 changed files with 66 additions and 64 deletions

View File

@@ -48,6 +48,13 @@ class BlockFile;
// to do: use shared_ptr instead
using BlockFilePtr = BlockFile *;
// to do: make this a synonym for make_shared
template< typename Result, typename... Args >
inline Result *make_blockfile (Args && ... args)
{
return new Result( std::forward< Args > ( args )... );
}
class PROFILE_DLL_API BlockFile /* not final, abstract */ {
public: