t-suw****@users*****
t-suw****@users*****
2007年 10月 20日 (土) 12:12:33 JST
Index: AquaSKK/src/backend/SKKCarbonBackEnd.cpp diff -u AquaSKK/src/backend/SKKCarbonBackEnd.cpp:1.1.2.1 AquaSKK/src/backend/SKKCarbonBackEnd.cpp:1.1.2.2 --- AquaSKK/src/backend/SKKCarbonBackEnd.cpp:1.1.2.1 Sun Oct 14 14:52:05 2007 +++ AquaSKK/src/backend/SKKCarbonBackEnd.cpp Sat Oct 20 12:12:33 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKCarbonBackEnd.cpp,v 1.1.2.1 2007/10/14 05:52:05 t-suwa Exp $ + $Id: SKKCarbonBackEnd.cpp,v 1.1.2.2 2007/10/20 03:12:33 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -24,6 +24,7 @@ #include <sstream> #include <algorithm> +#include "SKK.h" #include "CppCFString.h" #include "CppCFData.h" #include "ServerConnection.h" @@ -78,23 +79,23 @@ SKK::CandidateContainer result; typedef std::set<std::string> Check; - Check check; + Check duplicate; struct local { - static void unique(SKK::CandidateContainer& src, SKK::CandidateContainer& result, Check& check) { - for(SKK::CandidateIterator iter = src.begin(); iter != src.end(); ++ iter) { - if(check.find(iter->Face()) != check.end()) continue; + static void unique(SKK::CandidateContainer& in, SKK::CandidateContainer& out, Check& dup) { + for(SKK::CandidateIterator iter = in.begin(); iter != in.end(); ++ iter) { + if(dup.find(iter->Face()) != dup.end()) continue; - check.insert(check.lower_bound(iter->Face()), iter->Face()); - result.push_back(iter->Face()); + dup.insert(dup.lower_bound(iter->Face()), iter->Face()); + out.push_back(iter->Face()); } } }; - check.insert(entry); + duplicate.insert(entry); - local::unique(ret1, result, check); - local::unique(ret2, result, check); + local::unique(ret1, result, duplicate); + local::unique(ret2, result, duplicate); result.swap(ret1); }