fix an ambiguity in def'n of operator==

this resolve an error that arises when compiling with msvc 1936 which was previously ignored due to a bug in the compiler
develop
Kelly Kinkade 2023-07-07 17:21:25 -05:00
parent 734de0dcd1
commit 0ac05197c6
1 changed files with 5 additions and 1 deletions

@ -106,10 +106,14 @@ namespace DFHack
StateChangeScript(state_change_event event, std::string path, bool save_specific = false) StateChangeScript(state_change_event event, std::string path, bool save_specific = false)
:event(event), path(path), save_specific(save_specific) :event(event), path(path), save_specific(save_specific)
{ } { }
bool operator==(const StateChangeScript& other) bool const operator==(const StateChangeScript& other)
{ {
return event == other.event && path == other.path && save_specific == other.save_specific; return event == other.event && path == other.path && save_specific == other.save_specific;
} }
bool const operator!=(const StateChangeScript& other)
{
return !(operator==(other));
}
}; };
// Core is a singleton. Why? Because it is closely tied to SDL calls. It tracks the global state of DF. // Core is a singleton. Why? Because it is closely tied to SDL calls. It tracks the global state of DF.