I am shortening the C++ logic correctly?

Hi @Alexa.Ki!

Can I ask why you are opting to use the Conditional ternary operator ( ? ) ? While it would compile, it has a different function than you may have intended if it is supposed to read exactly like the above code.

Whereas if you used the logical operator && and treated the second variable as a bool like

if( : : IsValid(ChildMesh) && (IsValid(ChildMesh->SkeletalMesh))

would that not be appropriate for what you are attempting to do?

Any more relevant information to what you are trying to achieve would definitely help solve your mystery and I hope this helps!

2 Likes