Use wxASSERT() instead of assert() in wx code.

This is more consistent and ensures that all asserts in wxWidgets are
controlled by a single wxDEBUG_LEVEL setting instead of also relying on NDEBUG
as standard assert() macro does.

See #11155.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-18 14:04:22 +00:00
parent c81b7d7d53
commit 2e587bb9ec
3 changed files with 28 additions and 28 deletions

View File

@@ -877,11 +877,11 @@ static CTFontDescriptorRef wxMacCreateCTFontDescriptor(CFStringRef iFamilyName,
CTFontDescriptorRef descriptor = NULL;
CFMutableDictionaryRef attributes;
assert(iFamilyName != NULL);
wxASSERT(iFamilyName != NULL);
// Create a mutable dictionary to hold our attributes.
attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
check(attributes != NULL);
wxASSERT(attributes != NULL);
if (attributes != NULL) {
// Add a family name to our attributes.
@@ -895,13 +895,13 @@ static CTFontDescriptorRef wxMacCreateCTFontDescriptor(CFStringRef iFamilyName,
// Create the traits dictionary.
symTraits = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type,
&iTraits);
check(symTraits != NULL);
wxASSERT(symTraits != NULL);
if (symTraits != NULL) {
// Create a dictionary to hold our traits values.
traits = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
check(traits != NULL);
wxASSERT(traits != NULL);
if (traits != NULL) {
// Add the symbolic traits value to the traits dictionary.
@@ -916,7 +916,7 @@ static CTFontDescriptorRef wxMacCreateCTFontDescriptor(CFStringRef iFamilyName,
}
// Create the font descriptor with our attributes
descriptor = CTFontDescriptorCreateWithAttributes(attributes);
check(descriptor != NULL);
wxASSERT(descriptor != NULL);
CFRelease(attributes);
}