Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void TriSwap (csTriangle*& tr, const csTriangle tri,
- bool in)
- {
- if (in)
- {
- tr->a = tri.c;
- tr->b = tri.b;
- tr->c = tri.a;
- }
- else
- {
- tr->a = tri.a;
- tr->b = tri.b;
- tr->c = tri.c;
- }
- tr++;
- }
- a, b, c - int.
- csTriangle is a class that has a copying constructor.
- This suspicious code was found in Crystalspace project by PVS-Studio static code analyzer.
- Warning message is:
- V801 Decreased performance. It is better to redefine the second function argument as a reference. Consider replacing 'const .. tri' with 'const .. &tri'. libcrystalspace primitives.cpp 50
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement