Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
593897f1
Commit
593897f1
authored
Nov 22, 2022
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an assert to ma_zero_memory_default().
parent
d16e6e4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
miniaudio.h
miniaudio.h
+13
-8
No files found.
miniaudio.h
View file @
593897f1
...
...
@@ -11940,6 +11940,14 @@ MA_API const char* ma_version_string(void)
Standard Library Stuff
******************************************************************************/
#ifndef MA_ASSERT
#ifdef MA_WIN32
#define MA_ASSERT(condition) assert(condition)
#else
#define MA_ASSERT(condition) assert(condition)
#endif
#endif
#ifndef MA_MALLOC
#ifdef MA_WIN32
#define MA_MALLOC(sz) HeapAlloc(GetProcessHeap(), 0, (sz))
...
...
@@ -11966,6 +11974,11 @@ Standard Library Stuff
static MA_INLINE void ma_zero_memory_default(void* p, size_t sz)
{
if (p == NULL) {
MA_ASSERT(sz == 0); /* If this is triggered there's an error with the calling code. */
return;
}
#ifdef MA_WIN32
ZeroMemory(p, sz);
#else
...
...
@@ -11995,14 +12008,6 @@ static MA_INLINE void ma_zero_memory_default(void* p, size_t sz)
#endif
#endif
#ifndef MA_ASSERT
#ifdef MA_WIN32
#define MA_ASSERT(condition) assert(condition)
#else
#define MA_ASSERT(condition) assert(condition)
#endif
#endif
#define MA_ZERO_OBJECT(p) MA_ZERO_MEMORY((p), sizeof(*(p)))
#define ma_countof(x) (sizeof(x) / sizeof(x[0]))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment