Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LT-21829: Properly remove excluded lex refs #207

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Changes from 2 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
7 changes: 6 additions & 1 deletion Src/xWorks/ConfiguredLcmGenerator.cs
Original file line number Diff line number Diff line change
@@ -1711,7 +1711,7 @@ private static IFragment GenerateContentForSenses(ConfigurableDictionaryNode con
foreach (ILexSense item in senseCollection)
{
Debug.Assert(item != null);
if (publicationDecorator != null && publicationDecorator.IsExcludedObject(item))
if (publicationDecorator?.IsExcludedObject(item) ?? false)
continue;
filteredSenseCollection.Add(item);
}
@@ -2099,6 +2099,11 @@ private static IFragment GenerateCrossReferenceChildren(ConfigurableDictionaryNo
if (targetInfo == null)
return settings.ContentGenerator.CreateFragment();
var reference = targetInfo.Item2;
if (targetInfo.Item1 == null || !publicationDecorator.IsPublishableLexRef(reference.Hvo))
{
return settings.ContentGenerator.CreateFragment();
}

if (LexRefTypeTags.IsUnidirectional((LexRefTypeTags.MappingTypes)reference.OwnerType.MappingType) &&
LexRefDirection(reference, collectionOwner) == ":r")
{
2 changes: 1 addition & 1 deletion Src/xWorks/DictionaryPublicationDecorator.cs
Original file line number Diff line number Diff line change
@@ -525,7 +525,7 @@ private bool IsPublishableReversalEntry(IReversalIndexEntry revEntry)
/// </summary>
/// <param name="hvoRef"></param>
/// <returns></returns>
private bool IsPublishableLexRef(int hvoRef)
internal bool IsPublishableLexRef(int hvoRef)
{
var publishableItems = VecProp(hvoRef, LexReferenceTags.kflidTargets);
int originalItemCount = BaseSda.get_VecSize(hvoRef, LexReferenceTags.kflidTargets);

Unchanged files with check annotations Beta

#if !defined GRAPHITE2_NTRACING
if (dbgout)
dbgout->setenv(1, reinterpret_cast<void *>(j));

Check warning on line 512 in Lib/src/graphite2/src/Collider.cpp

GitHub Actions / Build Debug and run Tests

'reinterpret_cast': conversion from 'int' to 'void *' of greater size
#endif
if (omin > otmax)
_ranges[i].weightedAxis(i, vmin - _margin, vmax + _margin, 0, 0, 0, 0, 0,
<< json::close;
}
#endif
if (seg->currdir() != m_dir)

Check warning on line 397 in Lib/src/graphite2/src/Silf.cpp

GitHub Actions / Build Debug and run Tests

'!=': unsafe mix of type 'bool' and type 'const graphite2::uint8' in operation
seg->reverseSlots();
if (m_aMirror && (seg->dir() & 3) == 3)
seg->doMirror(m_aMirror);
* It is called from main(). Programmers can supply their own version to
* replace this null version.
*/
void GlobalSetup(bool verbose)

Check warning on line 12 in Lib/src/unit++/GlobalSetup.cc

GitHub Actions / Build Debug and run Tests

'verbose': unreferenced formal parameter
{
}