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

polserver / polserver / 21108840797

18 Jan 2026 08:35AM UTC coverage: 60.508% (+0.02%) from 60.492%
21108840797

push

github

web-flow
ClangTidy readability-else-after-return (#857)

* trigger tidy

* Automated clang-tidy change: readability-else-after-return

* compile test

* rerun

* Automated clang-tidy change: readability-else-after-return

* trigger..

* Automated clang-tidy change: readability-else-after-return

* manually removed a few

* Automated clang-tidy change: readability-else-after-return

* removed duplicate code

* fix remaining warnings

* fixed scope

---------

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

837 of 1874 new or added lines in 151 files covered. (44.66%)

46 existing lines in 25 files now uncovered.

44448 of 73458 relevant lines covered (60.51%)

525066.38 hits per line

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

68.0
/pol-core/pol/multi/multicr.cpp
1
/** @file
2
 *
3
 * @par History
4
 * - 2009/09/03 MuadDib:     Changes for account related source file relocation
5
 *                           Changes for multi related source file relocation
6
 */
7

8
#include <stddef.h>
9

10
#include "../../bscript/berror.h"
11
#include "../../clib/clib_endian.h"
12
#include "../../clib/logfacility.h"
13
#include "../../clib/rawtypes.h"
14
#include "../globals/object_storage.h"
15
#include "../item/itemdesc.h"
16
#include "../ufunc.h"
17
#include "boat.h"
18
#include "house.h"
19
#include "multi.h"
20

21

22
namespace Pol::Multi
23
{
24
bool isboat( u32 objtype )
×
25
{
26
  return Items::find_itemdesc( objtype ).type == Items::ItemDesc::BOATDESC;
×
27
}
28

29
bool ishouse( u32 objtype )
×
30
{
31
  return Items::find_itemdesc( objtype ).type == Items::ItemDesc::HOUSEDESC;
×
32
}
33

34
// scripted_create duplicates some of this work
35
// Dave changed 3/8/3 to use objecthash
36
UMulti* UMulti::create( const Items::ItemDesc& descriptor, u32 serial )
5✔
37
{
38
  UMulti* multi = nullptr;
5✔
39

40
  if ( descriptor.type == Items::ItemDesc::BOATDESC )
5✔
41
  {
42
    multi = new UBoat( descriptor );
1✔
43
  }
44
  else if ( descriptor.type == Items::ItemDesc::HOUSEDESC )
4✔
45
  {
46
    multi = new UHouse( descriptor );
4✔
47
  }
48
  else
49
  {
50
    ERROR_PRINTLN( "Tried to create multi {:#x} but no definition exists in itemdesc.cfg",
×
51
                   descriptor.objtype );
×
52
    return nullptr;
×
53
  }
54

55
  if ( serial )
5✔
56
    multi->serial = Core::UseItemSerialNumber( serial );
3✔
57
  else
58
    multi->serial = Core::GetNewItemSerialNumber();
2✔
59

60
  multi->serial_ext = ctBEu32( multi->serial );
5✔
61

62
  ////HASH
63
  Core::objStorageManager.objecthash.Insert( multi );
5✔
64
  ////
65

66
  return multi;
5✔
67
}
68

69

70
Bscript::BObjectImp* UMulti::scripted_create( const Items::ItemDesc& descriptor,
34✔
71
                                              const Core::Pos4d& pos, int flags )
72
{
73
  if ( descriptor.type == Items::ItemDesc::BOATDESC )
34✔
74
    return UBoat::scripted_create( descriptor, pos, flags );
19✔
75
  if ( descriptor.type == Items::ItemDesc::HOUSEDESC )
15✔
76
    return UHouse::scripted_create( descriptor, pos, flags );
15✔
NEW
77
  return new Bscript::BError( "Don't know what kind of multi to make" );
×
78
}
79
}  // namespace Pol::Multi
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