Commit 9dbfe997 authored by floatingatoll's avatar floatingatoll Committed by Soomin Lee

VLCRemoteBrowsingTVCell: Add .intValue highlighted by static analyzer

Xcode identified what it believes are four cases of integer comparison
without the necessary .intValue method for converting the NSNumber to an
integer for the comparison to succeed.

Each case does appear to be correctly identified, so this adds four
instances of .intValue matching similar cases elsewhere in the codebase.

(cherry picked from commit bed2f964)
Signed-off-by: Soomin Lee's avatarSoomin Lee <bubu@mikan.io>
parent ce692bca
......@@ -59,7 +59,7 @@
self.thumbnailImage = [UIImage imageNamed:@"folder"];
} else {
self.isDirectory = NO;
self.subtitle = (boxFile.size > 0) ? [NSByteCountFormatter stringFromByteCount:[boxFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]: @"";
self.subtitle = (boxFile.size.intValue > 0) ? [NSByteCountFormatter stringFromByteCount:[boxFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]: @"";
self.thumbnailImage = [UIImage imageNamed:@"blank"];
}
self.title = boxFile.name;
......@@ -85,13 +85,13 @@
}
}
if (oneDriveFile.size > 0) {
if (oneDriveFile.size.intValue > 0) {
[subtitle appendString:[NSByteCountFormatter stringFromByteCount:[oneDriveFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]];
if (oneDriveFile.duration > 0) {
if (oneDriveFile.duration.intValue > 0) {
VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
[subtitle appendFormat:@" — %@", [time verboseStringValue]];
}
} else if (oneDriveFile.duration > 0) {
} else if (oneDriveFile.duration.intValue > 0) {
VLCTime *time = [VLCTime timeWithNumber:oneDriveFile.duration];
[subtitle appendString:[time verboseStringValue]];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment