From aaccf0fe16cbe8da9e981854419f8a873a75a5e0 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 29 May 2024 07:26:35 +1000 Subject: tools/aueffectutil.mm: Fix build. --- src/tools/aueffectutil.mm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/tools/aueffectutil.mm b/src/tools/aueffectutil.mm index 20ae8413db9..7b2105f8696 100644 --- a/src/tools/aueffectutil.mm +++ b/src/tools/aueffectutil.mm @@ -628,25 +628,24 @@ static void UpdateChangeCountCallback( return nil; } - NSString *errDesc = nil; - NSData *const data = [NSPropertyListSerialization dataFromPropertyList:desc + NSError *errDesc = nil; + NSData *const data = [NSPropertyListSerialization dataWithPropertyList:desc format:NSPropertyListXMLFormat_v1_0 - errorDescription:&errDesc]; + options:0 + error:&errDesc]; if (!data || errDesc) { if (error) { NSString *message; if (errDesc) - message = [NSString stringWithFormat:@"Error serialising effect settings: %@", errDesc]; + message = [NSString stringWithFormat:@"Error serialising effect settings: %@", [errDesc localizedDescription]]; else message = @"Error serialising effect settings"; NSDictionary *const info = [NSDictionary dictionaryWithObjectsAndKeys:message, NSLocalizedDescriptionKey, nil]; *error = [NSError errorWithDomain:AUEffectUtilErrorDomain code:0 userInfo:info]; } - if (errDesc) - [errDesc release]; return nil; } return data; @@ -891,17 +890,18 @@ static void UpdateChangeCountCallback( subtypeValue, ComponentSubTypeKey, manufacturerValue, ComponentManufacturerKey, nil]; - NSString *errDesc = nil; - NSData *const data = [NSPropertyListSerialization dataFromPropertyList:desc + NSError *errDesc = nil; + NSData *const data = [NSPropertyListSerialization dataWithPropertyList:desc format:NSPropertyListXMLFormat_v1_0 - errorDescription:&errDesc]; + options:0 + error:&errDesc]; if (!data || errDesc) { NSAlert *const alert = [[NSAlert alloc] init]; [alert setAlertStyle:NSAlertStyleWarning]; [alert setMessageText:@"Error serialising properties for new effect"]; if (errDesc) - [alert setInformativeText:[errDesc autorelease]]; + [alert setInformativeText:[errDesc localizedDescription]]; [alert addButtonWithTitle:@"OK"]; [alert runModal]; [alert release]; @@ -1008,7 +1008,7 @@ static void UpdateChangeCountCallback( (unsigned long)failed.size(), ((1U == failed.size()) ? "" : "s")]; NSMutableString *const detail = [NSMutableString stringWithCapacity:(16 * failed.size())]; - std::vector >::const_iterator it = failed.begin(); + std::vector >::const_iterator it = failed.begin(); [detail appendFormat:@"%lu (%ld)", (unsigned long)it->first, (long)it->second]; ++it; while (failed.end() != it) -- cgit v1.2.3