ddnet/src/game
bors[bot] 155a922d47
Merge #4628 #4639
4628: Disable or fix some spammy new clang-tidy 13 warnings r=heinrich5991 a=def-

```
src/engine/client/backend/opengles/opengles_sl_program.cpp:10:11: warning: suspicious #include of file with '.cpp' extension [bugprone-suspicious-include]
          ^

src/engine/graphics.h:330:67: warning: 2 adjacent parameters of 'CFreeformItem' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters]
                CFreeformItem(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) :
                                                                                ^~~~~~~~~~~~~~~~~~

src/game/editor/layer_tiles.cpp:1802:14: warning: result of multiplication in type 'int' is used as a pointer offset after an implicit widening conversion to type 'ptrdiff_t' [bugprone-implicit-widening-of-multiplication-result]
                        mem_zero(&m_pSwitchTile[y * m_Width], o * sizeof(CSwitchTile));
                                  ^

src/game/server/entities/plasma.cpp💯152: warning: operator has equivalent nested operands [misc-redundant-expression]
        if(SnapPlayer && SnapPlayer->GetTeam() != TEAM_SPECTATORS && !SnapPlayer->IsPaused() && SnapChar && SnapChar && SnapChar->Team() != m_ResponsibleTeam && SnapPlayer->m_ShowOthers != 1)
                                                                                                ~~~~~~~~    ~~~~~~~~                                          ^

src/game/editor/editor.cpp:4295:38: warning: The right operand of '>' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
                        if(m_FilePreviewImageInfo.m_Width > Preview.w)
                                                          ^ ~~~~~~~~~
```
<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


4639: Fix SendStartWarning() to only warn every 3 seconds r=heinrich5991 a=def-

Thanks for Skeith for report

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
2022-01-26 13:17:54 +00:00
..
client Merge #4628 #4639 2022-01-26 13:17:54 +00:00
editor Fix any_of 2022-01-23 18:56:37 +01:00
server Merge #4628 #4639 2022-01-26 13:17:54 +00:00
bezier.cpp Run clang-format 2020-09-26 21:50:15 +02:00
bezier.h Run clang-format 2020-09-26 21:50:15 +02:00
collision.cpp Add more readability checks 2022-01-22 17:45:25 +01:00
collision.h Rename IsSwitch to GetSwitchType 2021-12-19 12:10:03 +01:00
ddracechat.h Merge pull request #5 from ddnet/master 2021-03-17 19:07:18 +02:00
ddracecommands.h Implement unmuteid, make it clearer that unmute uses ID from mutes 2021-12-18 11:28:54 +01:00
gamecore.cpp Add readability-container-size-empty 2022-01-22 13:54:25 +01:00
gamecore.h Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag. 2022-01-07 16:53:40 +01:00
layers.cpp Improve code style of InitTilemapSkip 2022-01-19 22:27:59 +01:00
layers.h Remove unnecessary trailing semicolons 2022-01-19 22:44:20 +01:00
localization.cpp Skip the UTF-8 BOM on all read text files 2021-12-17 22:07:01 +01:00
localization.h Run clang-format 2020-09-26 21:50:15 +02:00
mapbugs.cpp Add more readability checks 2022-01-22 17:45:25 +01:00
mapbugs.h Remove code for CRC in most places, except where needed for net compat 2020-10-14 17:08:58 +02:00
mapbugs_list.h Revert "Add mapbug "stoppers-passthrough@ddnet.tw"" 2018-08-22 08:33:21 +02:00
mapitems.cpp Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag. 2022-01-07 16:53:40 +01:00
mapitems.h Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag. 2022-01-07 16:53:40 +01:00
mapitems_ex.cpp Run clang-format 2020-09-26 21:50:15 +02:00
mapitems_ex.h Run clang-format 2020-09-26 21:50:15 +02:00
mapitems_ex_types.h Run clang-format 2020-09-26 21:50:15 +02:00
prng.cpp uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
prng.h uint64 -> uint64_t, int64 -> int64_t 2021-06-24 17:19:17 +02:00
teamscore.cpp Run clang-format 2020-09-26 21:50:15 +02:00
teamscore.h Fix some more undefined behavior with super (fixes #4412) 2021-11-29 17:12:50 +01:00
tuning.h Add hammer_hit_fire_delay tune 2021-05-01 16:36:12 +02:00
variables.h Add ClPredictionMargin 2022-01-09 13:08:11 +01:00
version.h Version 15.8.1 2021-12-28 20:14:41 +01:00
voting.h Run clang-format 2020-09-26 21:50:15 +02:00