silence some warnings by removing unused parameters

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35053 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2010-08-05 19:00:57 +00:00
parent 2361cefca1
commit 79346452c7
3 changed files with 14 additions and 14 deletions

View File

@ -70,7 +70,7 @@ SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word)
void AppleSpellChecker::insert(WordLangTuple const & word) void AppleSpellChecker::insert(WordLangTuple const & word)
{ {
string const word_str = to_utf8(word.word()); string const word_str = to_utf8(word.word());
learnAppleSpeller(d->speller, word_str.c_str(), word.lang()->code().c_str()); learnAppleSpeller(d->speller, word_str.c_str());
} }
@ -78,7 +78,7 @@ void AppleSpellChecker::insert(WordLangTuple const & word)
void AppleSpellChecker::accept(WordLangTuple const & word) void AppleSpellChecker::accept(WordLangTuple const & word)
{ {
string const word_str = to_utf8(word.word()); string const word_str = to_utf8(word.word());
ignoreAppleSpeller(d->speller, word_str.c_str(), word.lang()->code().c_str()); ignoreAppleSpeller(d->speller, word_str.c_str());
} }

View File

@ -22,10 +22,10 @@ AppleSpeller newAppleSpeller(void);
void freeAppleSpeller(AppleSpeller speller); void freeAppleSpeller(AppleSpeller speller);
int checkAppleSpeller(AppleSpeller speller, const char * word, const char * lang); int checkAppleSpeller(AppleSpeller speller, const char * word, const char * lang);
void ignoreAppleSpeller(AppleSpeller speller, const char * word, const char * lang); void ignoreAppleSpeller(AppleSpeller speller, const char * word);
size_t makeSuggestionAppleSpeller(AppleSpeller speller, const char * word, const char * lang); size_t makeSuggestionAppleSpeller(AppleSpeller speller, const char * word, const char * lang);
const char * getSuggestionAppleSpeller(AppleSpeller speller, size_t pos); const char * getSuggestionAppleSpeller(AppleSpeller speller, size_t pos);
void learnAppleSpeller(AppleSpeller speller, const char * word, const char * lang); void learnAppleSpeller(AppleSpeller speller, const char * word);
int hasLanguageAppleSpeller(AppleSpeller speller, const char * lang); int hasLanguageAppleSpeller(AppleSpeller speller, const char * lang);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -62,7 +62,7 @@ void freeAppleSpeller(AppleSpeller speller)
} }
static NSString * toString(AppleSpeller speller, const char * word) static NSString * toString(const char * word)
{ {
return [[NSString alloc] initWithBytes:word length:strlen(word) encoding:NSUTF8StringEncoding]; return [[NSString alloc] initWithBytes:word length:strlen(word) encoding:NSUTF8StringEncoding];
} }
@ -74,8 +74,8 @@ int checkAppleSpeller(AppleSpeller speller, const char * word, const char * lang
return 0; return 0;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString * word_ = toString(speller, word); NSString * word_ = toString(word);
NSString * lang_ = toString(speller, lang); NSString * lang_ = toString(lang);
NSRange result = [speller->checker NSRange result = [speller->checker
checkSpellingOfString:word_ checkSpellingOfString:word_
@ -93,10 +93,10 @@ int checkAppleSpeller(AppleSpeller speller, const char * word, const char * lang
} }
void ignoreAppleSpeller(AppleSpeller speller, const char * word, const char * lang) void ignoreAppleSpeller(AppleSpeller speller, const char * word)
{ {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString * word_ = toString(speller, word); NSString * word_ = toString(word);
[speller->checker ignoreWord:word_ inSpellDocumentWithTag:(speller->doctag)]; [speller->checker ignoreWord:word_ inSpellDocumentWithTag:(speller->doctag)];
@ -111,8 +111,8 @@ size_t makeSuggestionAppleSpeller(AppleSpeller speller, const char * word, const
return 0; return 0;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString * word_ = toString(speller, word); NSString * word_ = toString(word);
NSString * lang_ = toString(speller, lang); NSString * lang_ = toString(lang);
NSArray * result ; NSArray * result ;
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
@ -166,11 +166,11 @@ const char * getSuggestionAppleSpeller(AppleSpeller speller, size_t pos)
} }
void learnAppleSpeller(AppleSpeller speller, const char * word, const char * lang) void learnAppleSpeller(AppleSpeller speller, const char * word)
{ {
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050) #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString * word_ = toString(speller, word); NSString * word_ = toString(word);
if ([NSSpellChecker instancesRespondToSelector:@selector(learnWord)]) if ([NSSpellChecker instancesRespondToSelector:@selector(learnWord)])
[speller->checker learnWord:word_]; [speller->checker learnWord:word_];
@ -186,7 +186,7 @@ int hasLanguageAppleSpeller(AppleSpeller speller, const char * lang)
BOOL result = NO; BOOL result = NO;
#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050) #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString * lang_ = toString(speller, lang); NSString * lang_ = toString(lang);
if ([NSSpellChecker instancesRespondToSelector:@selector(availableLanguages)]) { if ([NSSpellChecker instancesRespondToSelector:@selector(availableLanguages)]) {
NSArray * languages = [speller->checker availableLanguages]; NSArray * languages = [speller->checker availableLanguages];