AngelscriptDebuggerServer/src/Breakpoint.hpp

27 lines
667 B
C++
Raw Normal View History

2021-09-28 16:13:22 +00:00
#ifndef ANGELSCRIPTDEBUGGER_BREAKPOINT_HPP
#define ANGELSCRIPTDEBUGGER_BREAKPOINT_HPP
#include <string>
#include <limits>
struct Breakpoint {
std::string Section;
int32_t Line;
bool operator==(const Breakpoint& other) const { return (Section == other.Section && Line == other.Line); }
};
namespace std {
template <> struct hash<Breakpoint> {
std::size_t operator()(const Breakpoint& k) const {
using std::hash;
using std::size_t;
using std::string;
return ((hash<string>()(k.Section) ^ (hash<int32_t>()(k.Line) << 1)) >> 1);
}
};
}
#endif // ANGELSCRIPTDEBUGGER_BREAKPOINT_HPP