polserver/pol-core/bscript/compiler/model/ScopeName.h
turleypol da2943acb8
Tidy copy initialization (#859)
* trigger tidy

* copy&move BApplicPtr obj
always commit tidy changes

* move PolObject

* fix house add_component

* Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param

* Revert "Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param"

This reverts commit bb6aab13dbdfa4aaf420cdaafaf22940f241fc5b.

* performance-unnecessary-value-param gives some weird suggestions

* Automated clang-tidy change: performance-unnecessary-copy-initialization

* minor performance improvements

* added used tidy check

* missing dependency

* renamed build so its no longer requires?

* better add docs for the sneaky fix

* silence pr check, not all headers can be compiled seperatly

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-19 08:17:28 +01:00

34 lines
639 B
C++

#pragma once
#include <optional>
#include <string>
namespace Pol::Bscript::Compiler
{
const std::string SUPER = "super";
class ScopeName : private std::optional<std::string>
{
public:
ScopeName( std::string name );
ScopeName();
// True if scope is global scope
bool global() const;
// True if scope is super scope
bool super() const;
// True if scope was not specified
bool empty() const;
// Returns "" or "foo"
std::string string() const;
static ScopeName Global;
static ScopeName None;
static ScopeName Super;
bool operator<( const ScopeName& other ) const;
};
} // namespace Pol::Bscript::Compiler