• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 21066490217

16 Jan 2026 12:22PM UTC coverage: 60.507%. Remained the same
21066490217

push

github

web-flow
misc clang-tidy (#853)

* trigger tidy

* Automated clang-tidy change: modernize-use-equals-delete,modernize-make-shared,modernize-make-unique,modernize-use-constraints,readability-container-size-empty,modernize-redundant-void-arg,modernize-use-emplace

* removed non needed macros

* missed to disable tidy build

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>

174 of 248 new or added lines in 74 files covered. (70.16%)

2 existing lines in 2 files now uncovered.

44459 of 73477 relevant lines covered (60.51%)

515895.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.29
/pol-core/pol/multi/multidef2.cpp
1
/** @file
2
 *
3
 * @par History
4
 * - 2006/12/05 Shinigami: removed dummy floor creation in MultiDef::readobjects and
5
 * MultiDef::readshapes
6
 * - 2009/09/03 MuadDib:   Relocation of multi related cpp/h
7
 */
8

9

10
#include "../../plib/clidata.h"
11
#include "../../plib/mapcell.h"
12
#include "../../plib/mapshape.h"
13
#include "../../plib/systemstate.h"
14
#include "../../plib/tiles.h"
15
#include "../../plib/udatfile.h"
16
#include "../item/itemdesc.h"
17
#include "multidef.h"
18

19
namespace Pol
20
{
21
namespace Multi
22
{
23
// 8/9/03 this seems to be used only by uofile03 -Syz
24
bool MultiDef::readobjects( Plib::StaticList& vec, const Core::Vec2d& rxy, short zbase ) const
×
25
{
26
  if ( !within_multi( rxy ) )
×
27
    return false;
×
28
  Components::const_iterator itr, end;
×
29
  if ( !findcomponents( itr, end, rxy ) )
×
30
    return false;
×
31
  bool result = false;
×
32
  for ( ; itr != end; ++itr )
×
33
  {
34
    const MULTI_ELEM* elem = ( *itr ).second;
×
35
    unsigned short graphic = Items::getgraphic( elem->objtype );
×
36
    if ( Plib::tile_flags( graphic ) & Plib::FLAG::WALKBLOCK )
×
37
    {
38
      if ( elem->is_static )
×
39
      {
NEW
40
        vec.emplace_back( graphic, static_cast<signed char>( elem->relpos.z() + zbase ) );
×
41
        result = true;
×
42
      }
43
      // Shinigami: removed. doesn't make sense. non-static
44
      //            items are normal items an can be removed etc.
45
      /* else // put a dummy floor tile there
46
       {
47
       vec.push_back( StaticRec( 0x495, elem->z+zbase ) );
48
       result = true;
49
       } */
50
    }
51
  }
52
  return result;
×
53
}
54

55
bool MultiDef::readshapes( Plib::MapShapeList& vec, const Core::Vec2d& rxy, short zbase,
23,551✔
56
                           unsigned int anyflags ) const
57
{
58
  if ( !within_multi( rxy ) )
23,551✔
59
    return false;
4,606✔
60
  Components::const_iterator itr, end;
18,945✔
61
  if ( !findcomponents( itr, end, rxy ) )
18,945✔
62
    return false;
10✔
63
  bool result = false;
18,935✔
64
  for ( ; itr != end; ++itr )
39,703✔
65
  {
66
    const MULTI_ELEM* elem = ( *itr ).second;
20,768✔
67
    // use raw objtype instead of itemdesc.graphic to ensure correct Line of Sight checks
68
    unsigned short graphic = elem->objtype;
20,768✔
69
    if ( Plib::tile_flags( graphic ) & anyflags )
20,768✔
70
    {
71
      if ( elem->is_static )
20,016✔
72
      {
73
        Plib::MapShape shape;
74
        shape.z = elem->relpos.z() + zbase;
19,521✔
75
        shape.height = Plib::tileheight( graphic );
19,521✔
76
        shape.flags = Plib::systemstate.tile[graphic].flags;  // pol_flags_by_tile( graphic );
19,521✔
77
        if ( !shape.height )
19,521✔
78
        {
79
          ++shape.height;
378✔
80
          --shape.z;
378✔
81
        }
82
        vec.push_back( shape );
19,521✔
83
        result = true;
19,521✔
84
      }
85
      // Shinigami: removed. doesn't make sense. non-static
86
      //            items are normal items an can be removed etc.
87
      // Turley: BOAT added so hold count as boat item (who.multi) (and walkable)
88
      else if ( is_boat )  // put a dummy floor there
495✔
89
      {
90
        Plib::MapShape shape;
91
        shape.z = elem->relpos.z() + zbase - 1;
136✔
92
        shape.height = 1;
136✔
93
        shape.flags = Plib::FLAG::MOVELAND | Plib::FLAG::ALLOWDROPON | Plib::FLAG::BLOCKSIGHT |
136✔
94
                      Plib::FLAG::OVERFLIGHT;
95
        vec.push_back( shape );
136✔
96
        result = true;
136✔
97
      }
98
    }
99
  }
100
  return result;
18,935✔
101
}
102
}  // namespace Multi
103
}  // namespace Pol
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc