Skip to content

Commit 1d89a4a

Browse files
author
FAREAST\vidadhee
committed
Change CGFloat to double for mac portability
1 parent a953005 commit 1d89a4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GraphODataTemplateWriter/CodeHelpers/ObjC/TypeHelperObjC.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static string GetTypeString(this OdcmType type)
111111
case "Double":
112112
case "Float":
113113
case "Single":
114-
return "CGFloat";
114+
return "double";
115115
case "DateTimeOffset":
116116
return "NSDate";
117117
case "Date":
@@ -149,7 +149,7 @@ public static bool IsComplex(this OdcmType type)
149149
{
150150
string t = GetTypeString(type);
151151
return
152-
!(t == "int32_t" || t == "int64_t" || t == "int16_t" || t == "BOOL" || t == "Byte" || t == "CGFloat");
152+
!(t == "int32_t" || t == "int64_t" || t == "int16_t" || t == "BOOL" || t == "Byte" || t == "double");
153153
}
154154

155155
public static bool IsComplex(this OdcmProperty property)
@@ -205,7 +205,7 @@ public static bool IsSystem(this OdcmProperty property)
205205
public static bool IsSystem(this OdcmType type)
206206
{
207207
string t = GetTypeString(type);
208-
return (t == "int32_t" || t == "int64_t" || t == "int16_t" || t == "BOOL" || t == "Byte" || t == "NSString" || t == "NSDate" || t == "NSStream" || t == "CGFloat");
208+
return (t == "int32_t" || t == "int64_t" || t == "int16_t" || t == "BOOL" || t == "Byte" || t == "NSString" || t == "NSDate" || t == "NSStream" || t == "double");
209209
}
210210

211211
public static bool IsComplexCollectionOpenType(this OdcmProperty property, OdcmModel model)
@@ -261,7 +261,7 @@ public static string GetNSNumberValueMethod(this OdcmType type)
261261
{
262262
return "boolValue";
263263
}
264-
else if (objectiveCType.Equals("CGFloat"))
264+
else if (objectiveCType.Equals("double"))
265265
{
266266
return "floatValue";
267267
}

0 commit comments

Comments
 (0)