From c974ff1b9e7da2698d47aeccf262160b80c818ea Mon Sep 17 00:00:00 2001 From: QU Zongyao Date: Tue, 19 Apr 2011 23:26:52 +0900 Subject: [PATCH] refactoring for Xcode 4 --- UniversalDetector.m | 4 +++- WrappedUniversalDetector.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UniversalDetector.m b/UniversalDetector.m index 869a316..a0736f2 100644 --- a/UniversalDetector.m +++ b/UniversalDetector.m @@ -5,7 +5,9 @@ @implementation UniversalDetector -(id)init { - if(self=[super init]) + self = [super init]; + + if(self) { detectorPtr = AllocUniversalDetector(); charsetName = nil; diff --git a/WrappedUniversalDetector.cpp b/WrappedUniversalDetector.cpp index b4db66a..3c150b2 100644 --- a/WrappedUniversalDetector.cpp +++ b/WrappedUniversalDetector.cpp @@ -58,6 +58,8 @@ class wrappedUniversalDetector:public nsUniversalDetector case ePureAscii: confidence=1.0; return "UTF-8"; + default: + break; } confidence=0;