From 0bc5f2795922d75fa18add8c528fa7d986edd2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 13 Sep 2010 16:15:15 +0000 Subject: [PATCH] * Thesaurus.cpp: fix synonym collection. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35358 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Thesaurus.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Thesaurus.cpp b/src/Thesaurus.cpp index d21453ab0f..bf657762c1 100644 --- a/src/Thesaurus.cpp +++ b/src/Thesaurus.cpp @@ -222,17 +222,17 @@ Thesaurus::Meanings Thesaurus::lookup(docstring const & t, docstring const & lan // they are needed for the CleanUpAfterLookup routine mentry * pm = pmean; docstring meaning; - docstring ret; for (int i = 0; i < count; i++) { + vector ret; meaning = from_iconv_encoding(string(pm->defn), encoding); // remove silly item if (support::prefixIs(meaning, '-')) meaning = support::ltrim(meaning, "- "); for (int j = 0; j < pm->count; j++) { - ret = from_iconv_encoding(string(pm->psyns[j]), encoding); + ret.push_back(from_iconv_encoding(string(pm->psyns[j]), encoding)); } - meanings[meaning].push_back(ret); - pm++; + meanings[meaning] = ret; + ++pm; } // now clean up all allocated memory mythes->CleanUpAfterLookup(&pmean, count);