aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m
diff options
context:
space:
mode:
authorMax <dmoagx@users.noreply.github.com>2018-04-29 23:59:56 +0200
committerMax <dmoagx@users.noreply.github.com>2018-04-29 23:59:56 +0200
commit5bd7cde2e69991b5cd9bde424c45e2da5bb34292 (patch)
tree26d0fe949a2184339796eaef86bebc3b730b507a /Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m
parentfc3e74c1e3f650e6efd3ddcce24d9e2c4d37c048 (diff)
downloadsequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.tar.gz
sequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.tar.bz2
sequelpro-5bd7cde2e69991b5cd9bde424c45e2da5bb34292.zip
* Formatting and minor code changes
* Fixed a memory leak in CF code
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m
index d617aebb..b7ced7ab 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLGeometryData.m
@@ -28,6 +28,8 @@
// More info at <https://github.com/sequelpro/sequelpro>
#import "SPMySQLGeometryData.h"
+#include <stdlib.h>
+#include <string.h>
enum wkbType
{
@@ -57,7 +59,7 @@ typedef struct st_point_2d_
/**
* Initialize the SPMySQLGeometryData object
*/
-- (id)init
+- (instancetype)init
{
if ((self = [super init])) {
geoBuffer = nil;
@@ -69,7 +71,7 @@ typedef struct st_point_2d_
/**
* Initialize the SPMySQLGeometryData object with the WKB data
*/
-- (id)initWithBytes:(const void *)geoData length:(NSUInteger)length
+- (instancetype)initWithBytes:(const void *)geoData length:(NSUInteger)length
{
if ((self = [self init])) {
bufferLength = length;
@@ -82,7 +84,7 @@ typedef struct st_point_2d_
/**
* Return an autorelease SPMySQLGeometryData object
*/
-+ (id)dataWithBytes:(const void *)geoData length:(NSUInteger)length
++ (instancetype)dataWithBytes:(const void *)geoData length:(NSUInteger)length
{
return [[[SPMySQLGeometryData alloc] initWithBytes:geoData length:length] autorelease];
}