Skip to content

Commit

Permalink
Changed operator equals in sets to only be used when explicitly gener…
Browse files Browse the repository at this point in the history
…ated
  • Loading branch information
JordanL8 committed Nov 9, 2023
1 parent 060cb8e commit b54eaba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generator/Generators/CSharp/CSharpSources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ private void GenerateFieldSetter(Field field, Class @class, QualifiedType fieldT
if (field.Type.TryGetClass(out Class fieldClass) && !(fieldClass is ClassTemplateSpecialization) && !fieldClass.IsValueType)
{
var caop = fieldClass.Methods.FirstOrDefault(m => m.OperatorKind == CXXOperatorKind.Equal);
if (caop != null && caop.IsGenerated)
if (caop != null && caop.IsExplicitlyGenerated)
{
var fieldName = ((Class)field.Namespace).Layout.Fields.First(
f => f.FieldPtr == field.OriginalPtr).Name;
Expand Down

0 comments on commit b54eaba

Please sign in to comment.