Use 64-bit: numeric type fixes

Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t.
The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
This commit is contained in:
Jacob Bandes-Storch
2012-08-27 16:24:11 -07:00
committed by Allan Odgaard
parent a79c9d0377
commit d4ce498f60
8 changed files with 17 additions and 17 deletions

View File

@@ -29,7 +29,7 @@
[[textView textStorage] setAttributedString:[[[NSAttributedString alloc] initWithString:[NSString stringWithCxxString:text::to_hex(first, last)] attributes:@{ NSFontAttributeName : [NSFont userFixedPitchFontOfSize:12] }] autorelease]];
[textView setEditable:NO];
int lines = oak::cap(5, (last - first) / 16, 20);
int lines = oak::cap(5, (int)((last - first) / 16), 20);
NSSize size = self.view.frame.size;
[self.view setFrameSize:NSMakeSize(size.width, size.height - 300 + 16*lines + 1)];
}