Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
0450faad
Commit
0450faad
authored
Jan 02, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCTime: Code cleanup and use Objective-C 2.0 @property. (Patch by Enrique Osuna).
parent
a5015dec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
extras/MacOSX/Framework/Headers/Public/VLCTime.h
extras/MacOSX/Framework/Headers/Public/VLCTime.h
+11
-3
extras/MacOSX/Framework/Sources/VLCTime.m
extras/MacOSX/Framework/Sources/VLCTime.m
+4
-5
No files found.
extras/MacOSX/Framework/Headers/Public/VLCTime.h
View file @
0450faad
...
@@ -24,19 +24,27 @@
...
@@ -24,19 +24,27 @@
#import <Cocoa/Cocoa.h>
#import <Cocoa/Cocoa.h>
/**
* Provides an object to define VLCMedia's ti me.
*/
@interface
VLCTime
:
NSObject
@interface
VLCTime
:
NSObject
{
{
NSNumber
*
value
;
NSNumber
*
value
;
//< Holds, in seconds, the VLCTime value
}
}
/* Factories */
+
(
VLCTime
*
)
nullTime
;
+
(
VLCTime
*
)
nullTime
;
+
(
VLCTime
*
)
timeWithNumber
:(
NSNumber
*
)
aNumber
;
+
(
VLCTime
*
)
timeWithNumber
:(
NSNumber
*
)
aNumber
;
//+ (VLCTime *)timeWithString:(NSString *)aString;
//+ (VLCTime *)timeWithString:(NSString *)aString;
/* Initializers */
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
;
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
;
//- (id)initWithString:(NSString *)aString;
//- (id)initWithString:(NSString *)aString;
-
(
NSNumber
*
)
numberValue
;
/* Properties */
-
(
NSString
*
)
stringValue
;
@property
(
readonly
)
NSNumber
*
numberValue
;
@property
(
readonly
)
NSString
*
stringValue
;
/* Comparitors */
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
;
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
;
@end
@end
extras/MacOSX/Framework/Sources/VLCTime.m
View file @
0450faad
...
@@ -24,11 +24,10 @@
...
@@ -24,11 +24,10 @@
#import <VLCTime.h>
#import <VLCTime.h>
static
VLCTime
*
nullTime
=
nil
;
@implementation
VLCTime
@implementation
VLCTime
+
(
VLCTime
*
)
nullTime
+
(
VLCTime
*
)
nullTime
{
{
static
VLCTime
*
nullTime
=
nil
;
if
(
!
nullTime
)
if
(
!
nullTime
)
nullTime
=
[[
VLCTime
timeWithNumber
:
nil
]
retain
];
nullTime
=
[[
VLCTime
timeWithNumber
:
nil
]
retain
];
return
nullTime
;
return
nullTime
;
...
@@ -76,7 +75,7 @@ static VLCTime *nullTime = nil;
...
@@ -76,7 +75,7 @@ static VLCTime *nullTime = nil;
-
(
NSNumber
*
)
numberValue
-
(
NSNumber
*
)
numberValue
{
{
return
value
?
[
value
copy
]
:
nil
;
return
value
?
[
[
value
copy
]
autorelease
]
:
nil
;
}
}
-
(
NSString
*
)
stringValue
-
(
NSString
*
)
stringValue
...
@@ -103,11 +102,11 @@ static VLCTime *nullTime = nil;
...
@@ -103,11 +102,11 @@ static VLCTime *nullTime = nil;
else
if
(
!
aTime
)
else
if
(
!
aTime
)
return
NSOrderedDescending
;
return
NSOrderedDescending
;
else
else
return
[
value
compare
:
[
aTime
numberValue
]
];
return
[
value
compare
:
aTime
.
numberValue
];
}
}
-
(
NSString
*
)
description
-
(
NSString
*
)
description
{
{
return
[
self
stringValue
]
;
return
self
.
stringValue
;
}
}
@end
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment