PageRenderTime 17ms CodeModel.GetById 2ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/Foundation/GTMExceptionalInlines.m

http://macfuse.googlecode.com/
Objective C | 56 lines | 27 code | 11 blank | 18 comment | 0 complexity | 094d4ebc143a69a79be54b2fc747a479 MD5 | raw file
 1//
 2//  GTMExceptionalInlines.m
 3//
 4//  Copyright 2008 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import "GTMExceptionalInlines.h"
20
21NSRange GTMNSMakeRange(NSUInteger loc, NSUInteger len) {
22  return NSMakeRange(loc, len);
23}
24
25CFRange GTMCFRangeMake(NSUInteger loc, NSUInteger len) {
26  return CFRangeMake(loc, len);
27}
28
29CGPoint GTMCGPointMake(CGFloat x, CGFloat y) {
30  return CGPointMake(x, y);
31}
32
33CGSize GTMCGSizeMake(CGFloat width, CGFloat height) {
34  return CGSizeMake(width, height);
35}
36
37CGRect GTMCGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) {
38  return CGRectMake(x, y, width, height);
39}
40
41#if !GTM_IPHONE_SDK
42// iPhone does not have NSTypes defined, only CGTypes. So no NSRect, NSPoint etc.
43
44NSPoint GTMNSMakePoint(CGFloat x, CGFloat y) {
45  return NSMakePoint(x, y);
46}
47
48NSSize GTMNSMakeSize(CGFloat w, CGFloat h) {
49  return NSMakeSize(w, h);
50}
51
52NSRect GTMNSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h) {
53  return NSMakeRect(x, y, w, h);
54}
55
56#endif