medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2fbc1873d8a447eff7f673af0062468d89a42d91
parent 254fbf9211def7bc29fed5c2b7aec5011d10fc1e
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu Jan 19 23:50:57 +0200

Add zero function

Diffstat:
intrinsics.h | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/intrinsics.h b/intrinsics.h @@ -170,6 +170,11 @@ inline To checked_cast( const From & from ) { return result; } +template< typename T > +inline void zero( T * x ) { + memset( x, 0, sizeof( T ) ); +} + // TODO: this sucks inline u8 * file_get_contents( const char * path, size_t * out_len = NULL ) { FILE * file = fopen( path, "rb" );