Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
alloy committed Sep 9, 2012
1 parent d5c7cc4 commit 3d1fa1c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/MacVim/MMFileBrowserController.m
Expand Up @@ -22,7 +22,6 @@ @interface MMFileBrowserFSItem : NSObject {
char *cpath;
BOOL isDir;
MMFileBrowserFSItem *parent;
// NSMutableArray *children;
MMVimController *vim;
BOOL includesHiddenFiles;
BOOL ignoreNextReload;
Expand Down Expand Up @@ -54,7 +53,6 @@ - (MMFileBrowserFSItem *)_itemAtPath:(NSArray *)components;

@implementation MMFileBrowserFSItem

// TODO use NSCache
static NSMutableDictionary *iconCache = nil;

// TODO use dispatch_once
Expand All @@ -64,7 +62,6 @@ + (void)initialize {
}
}

//@synthesize parent, includesHiddenFiles, ignoreNextReload, icon;
@synthesize parent, includesHiddenFiles, ignoreNextReload, children;

- (void)dealloc {
Expand All @@ -78,11 +75,12 @@ - (void)dealloc {
- (id)initWithPath:(NSString *)thePath vim:(MMVimController *)vimInstance;
{
return [self initWithPath:(char *)[thePath UTF8String] parent:nil isDir:YES vim:vimInstance];
//return [self initWithPath:thePath parent:nil isDir:YES vim:vimInstance];
}

- (id)initWithPath:(char *)thePath parent:(MMFileBrowserFSItem *)parentItem isDir:(BOOL)dir vim:(MMVimController *)vimInstance;
// - (id)initWithPath:(NSString *)thePath parent:(MMFileBrowserFSItem *)parentItem isDir:(BOOL)dir vim:(MMVimController *)vimInstance;
- (id)initWithPath:(char *)thePath
parent:(MMFileBrowserFSItem *)parentItem
isDir:(BOOL)dir
vim:(MMVimController *)vimInstance;
{
if ((self = [super init])) {
icon = nil;
Expand Down Expand Up @@ -147,7 +145,6 @@ - (NSArray *)children {
// Vim swap files have names of type
// .original-file-name.sXY
// where XY can be anything from "aa" to "wp".
// NSString *last4 = [filename substringFromIndex:[filename length]-4];
const char *last4 = &filename[len-4];
// if ([last4 compare:@".saa"] >= 0 && [last4 compare:@".swp"] <= 0) {
if (strcmp(last4, ".saa") >= 0 && strcmp(last4, ".swp") <= 0) {
Expand Down

0 comments on commit 3d1fa1c

Please sign in to comment.