Commit 3f0ff223 authored by Andrew Twyman's avatar Andrew Twyman

Merge pull request #199 from PSPDFKit-labs/peter/format-pedantic-warning-fix

Xcode 7.3 adds a warning if we print an Objective-C class as a pointer...
parents d9d43927 5cc3e12c
...@@ -395,7 +395,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -395,7 +395,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
w.w("[NSString stringWithFormat:@\"<%@ %p") w.w("[NSString stringWithFormat:@\"<%@ %p")
for (f <- r.fields) w.w(s" ${idObjc.field(f.ident)}:%@") for (f <- r.fields) w.w(s" ${idObjc.field(f.ident)}:%@")
w.w(">\", self.class, self") w.w(">\", self.class, (void *)self")
for (f <- r.fields) { for (f <- r.fields) {
w.w(", ") w.w(", ")
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p b:%@ eight:%@ sixteen:%@ thirtytwo:%@ sixtyfour:%@ fthirtytwo:%@ fsixtyfour:%@ oB:%@ oEight:%@ oSixteen:%@ oThirtytwo:%@ oSixtyfour:%@ oFthirtytwo:%@ oFsixtyfour:%@>", self.class, self, @(self.b), @(self.eight), @(self.sixteen), @(self.thirtytwo), @(self.sixtyfour), @(self.fthirtytwo), @(self.fsixtyfour), self.oB, self.oEight, self.oSixteen, self.oThirtytwo, self.oSixtyfour, self.oFthirtytwo, self.oFsixtyfour]; return [NSString stringWithFormat:@"<%@ %p b:%@ eight:%@ sixteen:%@ thirtytwo:%@ sixtyfour:%@ fthirtytwo:%@ fsixtyfour:%@ oB:%@ oEight:%@ oSixteen:%@ oThirtytwo:%@ oSixtyfour:%@ oFthirtytwo:%@ oFsixtyfour:%@>", self.class, (void *)self, @(self.b), @(self.eight), @(self.sixteen), @(self.thirtytwo), @(self.sixtyfour), @(self.fthirtytwo), @(self.fsixtyfour), self.oB, self.oEight, self.oSixteen, self.oThirtytwo, self.oSixtyfour, self.oFthirtytwo, self.oFsixtyfour];
} }
@end @end
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p recordId:%@ content:%@ misc:%@>", self.class, self, @(self.recordId), self.content, self.misc]; return [NSString stringWithFormat:@"<%@ %p recordId:%@ content:%@ misc:%@>", self.class, (void *)self, @(self.recordId), self.content, self.misc];
} }
@end @end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p someInteger:%@ someString:%@>", self.class, self, @(self.someInteger), self.someString]; return [NSString stringWithFormat:@"<%@ %p someInteger:%@ someString:%@>", self.class, (void *)self, @(self.someInteger), self.someString];
} }
@end @end
...@@ -61,7 +61,7 @@ BOOL const DBConstantsDummy = NO; ...@@ -61,7 +61,7 @@ BOOL const DBConstantsDummy = NO;
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p>", self.class, self]; return [NSString stringWithFormat:@"<%@ %p>", self.class, (void *)self];
} }
@end @end
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p createdAt:%@>", self.class, self, self.createdAt]; return [NSString stringWithFormat:@"<%@ %p createdAt:%@>", self.class, (void *)self, self.createdAt];
} }
@end @end
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p>", self.class, self]; return [NSString stringWithFormat:@"<%@ %p>", self.class, (void *)self];
} }
@end @end
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p member:%@ e:%@>", self.class, self, self.member, @(self.e)]; return [NSString stringWithFormat:@"<%@ %p member:%@ e:%@>", self.class, (void *)self, self.member, @(self.e)];
} }
@end @end
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p datesById:%@>", self.class, self, self.datesById]; return [NSString stringWithFormat:@"<%@ %p datesById:%@>", self.class, (void *)self, self.datesById];
} }
@end @end
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p mapList:%@>", self.class, self, self.mapList]; return [NSString stringWithFormat:@"<%@ %p mapList:%@>", self.class, (void *)self, self.mapList];
} }
@end @end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p map:%@ imap:%@>", self.class, self, self.map, self.imap]; return [NSString stringWithFormat:@"<%@ %p map:%@ imap:%@>", self.class, (void *)self, self.map, self.imap];
} }
@end @end
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p setList:%@>", self.class, self, self.setList]; return [NSString stringWithFormat:@"<%@ %p setList:%@>", self.class, (void *)self, self.setList];
} }
@end @end
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p myColor:%@>", self.class, self, self.myColor]; return [NSString stringWithFormat:@"<%@ %p myColor:%@>", self.class, (void *)self, self.myColor];
} }
@end @end
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p list:%@>", self.class, self, self.list]; return [NSString stringWithFormat:@"<%@ %p list:%@>", self.class, (void *)self, self.list];
} }
@end @end
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p key1:%@ key2:%@>", self.class, self, @(self.key1), self.key2]; return [NSString stringWithFormat:@"<%@ %p key1:%@ key2:%@>", self.class, (void *)self, @(self.key1), self.key2];
} }
@end @end
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p dt:%@>", self.class, self, @(self.dt)]; return [NSString stringWithFormat:@"<%@ %p dt:%@>", self.class, (void *)self, @(self.dt)];
} }
@end @end
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p key:%@ rec:%@>", self.class, self, @(self.key), self.rec]; return [NSString stringWithFormat:@"<%@ %p key:%@ rec:%@>", self.class, (void *)self, @(self.key), self.rec];
} }
@end @end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- (NSString *)description - (NSString *)description
{ {
return [NSString stringWithFormat:@"<%@ %p set:%@ iset:%@>", self.class, self, self.set, self.iset]; return [NSString stringWithFormat:@"<%@ %p set:%@ iset:%@>", self.class, (void *)self, self.set, self.iset];
} }
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment