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

polserver / polserver / 16683711876

01 Aug 2025 07:40PM UTC coverage: 59.756% (-0.03%) from 59.79%
16683711876

push

github

web-flow
use c++20 (#799)

* use c++20
* increased used clang version
* compiler report and logfacility use now compile time formatting, which
means that the formatstring gets checked at compile time. (which found 2 errors)
adapted a few places since report only accepts formatting arguments
adapted a few places with logging since char[] is compile time
formatting and string or chr* is runtime formatting
* use std::ranges instead of boost
* disabled pragma_assume vs specific macro (I guess noone cares)
* needed to fix ancient ms exception code
* modernized SpinLock
* removed unused code in ECompile
* replaced std::filesystem::path::u8string with string. It now returns an actual u8string type
* cleanup layers.h added the defines for other layers which where before
  only defined in the pkt
* osmod::OpenConnection and HTTPRequest cleanup: early outs, dont check for pChild which is
  only needed for startscript and placed suspend at the very last
  position

* fix warning

* rebuild cache with new compiler version

* define c++ standard for external libs where possible

* added fixme

156 of 212 new or added lines in 26 files covered. (73.58%)

45 existing lines in 19 files now uncovered.

43621 of 72999 relevant lines covered (59.76%)

409874.73 hits per line

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

78.57
/pol-core/bscript/compiler/analyzer/Constants.cpp
1
#include "Constants.h"
2

3
#include "bscript/compiler/Report.h"
4
#include "bscript/compiler/ast/ConstDeclaration.h"
5

6
namespace Pol::Bscript::Compiler
7
{
8
Constants::Constants( Report& report ) : report( report ) {}
2,354✔
9

10
ConstDeclaration* Constants::find( const std::string& name )
55,406✔
11
{
12
  auto itr = constants.find( name );
55,406✔
13
  return ( itr != constants.end() ) ? ( *itr ).second : nullptr;
55,406✔
14
}
15

16
void Constants::create( ConstDeclaration& constant )
154,406✔
17
{
18
  auto itr = constants.find( constant.identifier );
154,406✔
19
  if ( itr != constants.end() )
154,406✔
20
  {
21
    if ( constant.ignore_overwrite_attempt )
6✔
22
    {
23
      // The OG compiler ignores enum members with the same name as a
24
      // constant or enum that was defined earlier.
25

UNCOV
26
      report.warning( constant,
×
27
                      "Constant '{}' definition ignored due to an earlier definition.\n"
28
                      "  Previous definition at: {}",
29
                      constant.identifier, ( *itr ).second->source_location );
6✔
30
      return;
6✔
31
    }
32
    report.error( constant,
×
33
                  "Constant '{}' defined more than once.\n"
34
                  "  Previous definition at: {}",
35
                  constant.identifier, ( *itr ).second->source_location );
×
36
  }
37

38
  constants[constant.identifier] = &constant;
154,400✔
39
}
40

41
}  // namespace Pol::Bscript::Compiler
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