diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-18 22:39:06 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | a0f36a50e6324f570985f5010eb0543ec0673aeb (patch) | |
tree | 09f9c9abd097acc244f80366da42cb8702c7ed19 /src/newgrf_commons.cpp | |
parent | ca2f33c6d025c0c45fb4bc472493290445312de5 (diff) | |
download | openttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz |
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index e25f6d085..e201ca736 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -666,7 +666,8 @@ uint32 NewGRFSpriteLayout::PrepareLayout(uint32 orig_offset, uint32 newgrf_groun /* Create a copy of the spritelayout, so we can modify some values. * Also include the groundsprite into the sequence for easier processing. */ - DrawTileSeqStruct *result = result_seq.Append(); + /*C++17: DrawTileSeqStruct *result = &*/ result_seq.emplace_back(); + DrawTileSeqStruct *result = &result_seq.back(); result->image = ground; result->delta_x = 0; result->delta_y = 0; @@ -674,10 +675,10 @@ uint32 NewGRFSpriteLayout::PrepareLayout(uint32 orig_offset, uint32 newgrf_groun const DrawTileSeqStruct *dtss; foreach_draw_tile_seq(dtss, this->seq) { - *result_seq.Append() = *dtss; + result_seq.push_back(*dtss); } - result_seq.Append()->MakeTerminator(); - + result_seq.emplace_back() /*C++17: .MakeTerminator()*/; + result_seq.back().MakeTerminator(); /* Determine the var10 values the action-1-2-3 chains needs to be resolved for, * and apply the default sprite offsets (unless disabled). */ const TileLayoutRegisters *regs = this->registers; |