aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleCommandTextView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPBundleCommandTextView.m')
-rw-r--r--Source/SPBundleCommandTextView.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m
index 4ca63451..f8d4e53f 100644
--- a/Source/SPBundleCommandTextView.m
+++ b/Source/SPBundleCommandTextView.m
@@ -40,8 +40,8 @@
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
[prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth];
- [prefs release];
- [lineNumberView release];
+ SPClear(prefs);
+ SPClear(lineNumberView);
[super dealloc];
}
@@ -377,7 +377,7 @@
NSInteger tabStopWidth = [prefs integerForKey:SPCustomQueryEditorTabStopWidth];
if(tabStopWidth < 1) tabStopWidth = 1;
- float tabWidth = NSSizeToCGSize([@" " sizeWithAttributes:[NSDictionary dictionaryWithObject:tvFont forKey:NSFontAttributeName]]).width;
+ float tabWidth = NSSizeToCGSize([@" " sizeWithAttributes:@{NSFontAttributeName : tvFont}]).width;
tabWidth = (float)tabStopWidth * tabWidth;
NSInteger numberOfTabs = 256/tabStopWidth;