Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor cleanup in DetectorTest.

  • Loading branch information...
commit ba9e82833e04eb834e4291bcbdc782c683946653 1 parent a92a9ef
@JanX2 authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 DetectorTest.m
View
12 DetectorTest.m
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.