Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RTTI class IDs #498

Merged
merged 2 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/NetBox/FarDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ inline TRect Rect(int32_t Left, int32_t Top, int32_t Right, int32_t Bottom)
return TRect(Left, Top, Right, Bottom);
}

constexpr const TObjectClassId OBJECT_CLASS_TDialogIdleThread = static_cast<TObjectClassId>(nb::counter_id());
class TFarDialogIdleThread final : public TSimpleThread
{
public:
Expand Down
1 change: 0 additions & 1 deletion src/NetBox/FarPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,6 @@ void TCustomFarPlugin::SaveTerminalScreen()
FarControl(FCTL_SETUSERSCREEN, 0, nullptr);
}

const TObjectClassId OBJECT_CLASS_TConsoleTitleParam = static_cast<TObjectClassId>(nb::counter_id());
class TConsoleTitleParam : public TObject
{
public:
Expand Down
1 change: 0 additions & 1 deletion src/NetBox/WinSCPFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ void TFarInteractiveCustomCommand::Prompt(int32_t /*Index*/, const UnicodeString

// Attempt to allow keepalives from background thread.
// Not finished nor used.
const TObjectClassId OBJECT_CLASS_TKeepAliveThread = static_cast<TObjectClassId>(nb::counter_id());
class TKeepAliveThread final : public TSimpleThread
{
public:
Expand Down
6 changes: 6 additions & 0 deletions src/base/ObjIDs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,10 @@ const TObjectClassId OBJECT_CLASS_TRemoteFilePanelItem = static_cast<TObjectClas
const TObjectClassId OBJECT_CLASS_TWinSCPPlugin = static_cast<TObjectClassId>(nb::counter_id());
const TObjectClassId OBJECT_CLASS_TFarMessageData = static_cast<TObjectClassId>(nb::counter_id());

const TObjectClassId OBJECT_CLASS_TTerminalItem = static_cast<TObjectClassId>(nb::counter_id());
const TObjectClassId OBJECT_CLASS_TBackgroundTerminal = static_cast<TObjectClassId>(nb::counter_id());
const TObjectClassId OBJECT_CLASS_TDialogIdleThread = static_cast<TObjectClassId>(nb::counter_id());
const TObjectClassId OBJECT_CLASS_TConsoleTitleParam = static_cast<TObjectClassId>(nb::counter_id());
const TObjectClassId OBJECT_CLASS_TKeepAliveThread = static_cast<TObjectClassId>(nb::counter_id());

} // extern "C"
6 changes: 6 additions & 0 deletions src/base/ObjIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,11 @@ extern const TObjectClassId OBJECT_CLASS_TRightsContainer;
extern const TObjectClassId OBJECT_CLASS_TCopyParamsContainer;
extern const TObjectClassId OBJECT_CLASS_TLabelList;

extern const TObjectClassId OBJECT_CLASS_TTerminalItem;
extern const TObjectClassId OBJECT_CLASS_TBackgroundTerminal;
extern const TObjectClassId OBJECT_CLASS_TDialogIdleThread;
extern const TObjectClassId OBJECT_CLASS_TConsoleTitleParam;
extern const TObjectClassId OBJECT_CLASS_TKeepAliveThread;

} // extern "C"

2 changes: 0 additions & 2 deletions src/core/Queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ class TReadDirectoryProgressAction final : public TUserAction
bool Cancel{false};
};

constexpr TObjectClassId OBJECT_CLASS_TTerminalItem = static_cast<TObjectClassId>(nb::counter_id());
class TTerminalItem final : public TSignalThread
{
friend class TQueueItem;
Expand Down Expand Up @@ -1250,7 +1249,6 @@ bool TTerminalQueue::ContinueParallelOperation() const

// TBackgroundItem

constexpr TObjectClassId OBJECT_CLASS_TBackgroundTerminal = static_cast<TObjectClassId>(nb::counter_id());
class TBackgroundTerminal final : public TSecondaryTerminal
{
friend class TTerminalItem;
Expand Down
2 changes: 1 addition & 1 deletion src/include/rtti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ struct depth
template<int N>
struct mark
{
friend constexpr int adl_flag(flag<N>) { return N; }
friend constexpr int adl_flag(flag<N>) noexcept { return N; }
static constexpr int value = N;
};

Expand Down