Permalink
Browse files

Minor cleanup in DetectorTest.

  • Loading branch information...
1 parent a92a9ef commit ba9e82833e04eb834e4291bcbdc782c683946653 @JanX2 committed Jan 20, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 DetectorTest.m
View
@@ -4,17 +4,17 @@
int main(int argc,char **argv)
{
- NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init];
-
- UniversalDetector *detector = [[UniversalDetector alloc] init];
-
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ UniversalDetector *detector = [UniversalDetector new];
+
NSString *str = nil;
for (int i = 1; i < argc; i++)
{
NSData *data = [NSData dataWithContentsOfFile:[NSString stringWithUTF8String:argv[i]]];
[detector analyzeData:data];
-
+
str = [NSString stringWithFormat:@"\"%@\" (%s) confidence: %.1f%%\n",
[NSString localizedNameOfStringEncoding:[detector encoding]],
[[detector MIMECharset] UTF8String],
@@ -25,7 +25,7 @@ int main(int argc,char **argv)
}
[detector release];
-
+
[pool release];
return 0;
}

0 comments on commit ba9e828

Please sign in to comment.