Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inflection/src/inflection/dialog/NumberConcept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <inflection/npc.hpp>
#include <icu4cxx/NumberFormat.hpp>
#include <math.h>
#include <cstdlib>

namespace inflection::dialog {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ static void checkinCachedTokenizer(UBreakIterator* tokenizer)
gTokenizerCache->push(tokenizer);
tokenizer = nullptr;
}
catch (const std::bad_alloc& e) {
catch (const std::bad_alloc&) {
// Oh well, delete it below
e.what();
}
Copy link
Copy Markdown
Member

@grhoten grhoten May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was meant to address a different warning about not handling such issues, but whatever. The behavior of ignoring the rare exception is intentional.

}
if (tokenizer != nullptr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include <inflection/exception/ICUException.hpp>
#include <string_view>
#include <unicode/utf16.h>
#include <unicode/uchar.h>

namespace inflection::tokenizer::iterator {

Expand Down
1 change: 1 addition & 0 deletions inflection/src/inflection/util/ResourceLocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <TargetConditionals.h>
#endif
#include <dlfcn.h>
#include <cstdlib>

namespace inflection::util {

Expand Down
1 change: 1 addition & 0 deletions inflection/src/inflection/util/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <inflection/util/StringUtils.hpp>
#include <inflection/util/StringViewUtils.hpp>
#include <unicode/uchar.h>
#include <unicode/utf16.h>
#include <inflection/npc.hpp>

namespace inflection::util {
Expand Down
1 change: 1 addition & 0 deletions inflection/src/inflection/util/StringViewUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <inflection/npc.hpp>
#include <unicode/uchar.h>
#include <unicode/ustring.h>
#include <unicode/utf8.h>

namespace inflection::util {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST_CASE("MMappedDictionaryTest#testStringContainer")
TEST_CASE("MMappedDictionaryTest#testCompressedArray")
{
std::vector<int32_t> testData({1,3,2});
inflection::dictionary::metadata::CompressedArray compressedArray(testData);
inflection::dictionary::metadata::CompressedArray<int32_t> compressedArray(testData);
CHECK_THROWS(compressedArray.read(-1));
CHECK(compressedArray.read(0) == 1);
CHECK(compressedArray.read(1) == 3);
Expand Down
4 changes: 2 additions & 2 deletions inflection/tools/buildDictionary/InflectionDictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void InflectionDictionary::write(::std::ofstream& writer, DictionaryLogger& logg
npc(inflection_Suffixes)->write(writer);
logger.logWithOffset(locale.getName() + " inflection_Suffixes number=" + std::to_string(npc(inflection_Suffixes)->size()));

inflection::dictionary::metadata::CompressedArray compressedInflectionsArray(inflectionsArray);
inflection::dictionary::metadata::CompressedArray<int64_t> compressedInflectionsArray(inflectionsArray);
compressedInflectionsArray.serialize(writer);
logger.logWithOffset(locale.getName() + " inflections number=" + std::to_string(inflectionsArray.size()));

Expand All @@ -245,7 +245,7 @@ void InflectionDictionary::write(::std::ofstream& writer, DictionaryLogger& logg
npc(suffixToIdentifierRunsTrie)->write(writer);
logger.logWithOffset(locale.getName() + " suffixToIdentifierRunsTrie");

inflection::dictionary::metadata::CompressedArray compressedSuffixesToInflectionsArray(suffixesToInflections.getSingletons());
inflection::dictionary::metadata::CompressedArray<int64_t> compressedSuffixesToInflectionsArray(suffixesToInflections.getSingletons());
compressedSuffixesToInflectionsArray.serialize(writer);
logger.logWithOffset(locale.getName() + " suffixesToInflections");

Expand Down
6 changes: 3 additions & 3 deletions inflection/tools/buildDictionary/LexicalDictionaryBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ void LexicalDictionaryBuilder::writeDictionary(::std::ofstream& writer,
propertyNameToKeyId,
propertyValuesStringContainer,
propertyValueMapsVector);
inflection::dictionary::metadata::CompressedArray propertyValueMaps(propertyValueMapsVector);
inflection::dictionary::metadata::CompressedArray<int32_t> propertyValueMaps(propertyValueMapsVector);

auto bitsTypesSingletons = getNumBitsFromValues(wordsToTypesSingletons);
auto bitsPropertyMapId = getNumBitsFromValues(wordToPropertyMapId);
Expand Down Expand Up @@ -376,9 +376,9 @@ void LexicalDictionaryBuilder::writeDictionary(::std::ofstream& writer,
dataSingletons.clear();
}

CompressedArray dataSingletonsRaw(dataSingletons);
CompressedArray<uint64_t> dataSingletonsRaw(dataSingletons);

MarisaTrie wordsToDataTrie(use2Stage ? wordsToDataSingletons : wordsToData);
MarisaTrie<uint64_t> wordsToDataTrie(use2Stage ? wordsToDataSingletons : wordsToData);

write(writer,
logger,
Expand Down
Loading