Page MenuHome

blenlib/ Any tests: fix self-assignment warning and typo
ClosedPublic

Authored by Ankit Meel (ankitm) on Jan 14 2022, 8:41 AM.

Details

Summary

Fix assignment warning

source/blender/blenlib/tests/BLI_any_test.cc:56:5: warning: explicitly assigning value of variable of type 'blender::Any<void, 8, 8>' to itself [-Wself-assign-overloaded]
  c = c;
  ~ ^ ~
1 warning generated.

Change expect statement assuming it was a copy paste error.

[ RUN      ] any.AssignMap
[       OK ] any.AssignMap (1 ms)

Diff Detail

Repository
rB Blender

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Jan 14 2022, 8:41 AM
Ankit Meel (ankitm) created this revision.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)

It wasn't a copy paste error. This is testing assignment-to-self...
Can the warning be disabled in a different way?

Changing b to c seems correct though.

Ankit Meel (ankitm) retitled this revision from blenlib/ Any tests: fix warning, fix test typo to blenlib/ Any tests: fix self-assignment warning and typo.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)

Haven't tested it, but seems reasonable.

This revision is now accepted and ready to land.Jan 14 2022, 1:39 PM