From f30b62ffdb8b1cc5e51a5331383f4682a2e47939 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Fri, 8 Aug 2014 05:57:38 +0000 Subject: MacGui: use a shorter NSString method to remove the prefix from the bsdName, as reported by denisx on irc, in HBDVDDetector and and a boxing expression to convert a c string to NSString. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6275 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBDVDDetector.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/HBDVDDetector.m b/macosx/HBDVDDetector.m index 6d12ed64e..05ff786b1 100644 --- a/macosx/HBDVDDetector.m +++ b/macosx/HBDVDDetector.m @@ -83,11 +83,11 @@ struct statfs s; statfs([path fileSystemRepresentation], &s); - bsdName = [NSString stringWithUTF8String:s.f_mntfromname]; + bsdName = @(s.f_mntfromname); if ([bsdName hasPrefix:@"/dev/"]) { - bsdName = [bsdName stringByReplacingCharactersInRange:NSMakeRange(0, 5) withString:@""]; + bsdName = [bsdName substringFromIndex:5]; } return [bsdName retain]; -- cgit v1.2.3