Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
fix inexplicably weird msvc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
int-72h committed Jun 14, 2024
1 parent d25ebbf commit 934a769
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Code/binding/binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void binding::init_palace() { // yucky hack but we can manually start palace fr
void binding::_init_palace() {
A_init_error_system();
A_error_system->RegisterListener(EventType::kOnError, [this](Event& ev) {
emit_signal("error", String(static_cast<ErrorMessage&>(ev).GetMessage().c_str()));
emit_signal("error", String(static_cast<ErrorMessage&>(ev).get_message().c_str()));
});
UtilityFunctions::print("[binding] Firing up palace!");
p = new palace;
Expand Down
2 changes: 1 addition & 1 deletion Code/headless/headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ int main() {
auto p = new palace; // does sanity checks
A_init_error_system();
A_error_system->RegisterListener(EventType::kOnError, [](Event& ev) {
printf(static_cast<ErrorMessage&>(ev).GetMessage().c_str());
printf(static_cast<ErrorMessage&>(ev).get_message().c_str());
});
p->find_sourcemod_path();
if (p->sourcemodsPath.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion Code/shared/events/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ErrorMessage::ErrorMessage(std::string message) : Event(EventType::kOnError) { m_szMessage = message; }

const std::string& ErrorMessage::GetMessage() { return m_szMessage; }
const std::string& ErrorMessage::get_message() { return m_szMessage; }
2 changes: 1 addition & 1 deletion Code/shared/events/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class ErrorMessage : public Event {
public:
ErrorMessage(std::string message);
const std::string& GetMessage();
const std::string& get_message();

private:
std::string m_szMessage;
Expand Down

0 comments on commit 934a769

Please sign in to comment.