summaryrefslogtreecommitdiffstats
path: root/macosx/HBPreviewController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-01-19 15:35:35 +0000
committerritsuka <[email protected]>2015-01-19 15:35:35 +0000
commit2e7330affab701fb1443fec449e2b04690b32e33 (patch)
treeb00b4de54ca6c26d5ecb7c13b15f344292b00988 /macosx/HBPreviewController.m
parentea82134f6199f79cb939781cb38dceaa1534dbc1 (diff)
MacGui: enable and fix more compiler warnings in the Xcode project.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6772 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r--macosx/HBPreviewController.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m
index e921574c1..b139fa25d 100644
--- a/macosx/HBPreviewController.m
+++ b/macosx/HBPreviewController.m
@@ -35,17 +35,17 @@
{
QTTime time = [self currentTime];
double timeInSeconds = (double)time.timeValue / time.timeScale;
- UInt16 seconds = fmod(timeInSeconds, 60.0);
- UInt16 minutes = fmod(timeInSeconds / 60.0, 60.0);
- UInt16 hours = timeInSeconds / (60.0 * 60.0);
- UInt16 milliseconds = (timeInSeconds - (int) timeInSeconds) * 1000;
+ UInt16 seconds = (UInt16)fmod(timeInSeconds, 60.0);
+ UInt16 minutes = (UInt16)fmod(timeInSeconds / 60.0, 60.0);
+ UInt16 hours = (UInt16)(timeInSeconds / (60.0 * 60.0));
+ UInt16 milliseconds = (UInt16)(timeInSeconds - (int) timeInSeconds) * 1000;
return [NSString stringWithFormat:@"%02d:%02d:%02d.%03d", hours, minutes, seconds, milliseconds];
}
- (void) setCurrentTimeDouble: (double) value
{
long timeScale = [[self attributeForKey:QTMovieTimeScaleAttribute] longValue];
- [self setCurrentTime:QTMakeTime(value * timeScale, timeScale)];
+ [self setCurrentTime:QTMakeTime((long long)value * timeScale, timeScale)];
}
@end
@@ -370,8 +370,8 @@ typedef enum ViewMode : NSUInteger {
NSRect frame = [[self window] frame];
// Calculate border around content region of the frame
- int borderX = frame.size.width - currentSize.width;
- int borderY = frame.size.height - currentSize.height;
+ int borderX = (int)(frame.size.width - currentSize.width);
+ int borderY = (int)(frame.size.height - currentSize.height);
// Make sure the frame is smaller than the screen
NSSize maxSize = [[[self window] screen] visibleFrame].size;