mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
* updated virtual desktop retrieving * save with null-guid * moved guid utils * moved DeviceIdData related functions * replaced strings with data structs * default value * clean up * save app zone history with zones settings * compare with null guid * updated tests * refactoring * logs * sync vd ids * logs * refactoring * check virtual desktop id * OnDisplayChange call * compare device ids in editor
41 lines
799 B
C++
41 lines
799 B
C++
#pragma once
|
|
|
|
#include "gdiplus.h"
|
|
|
|
namespace std
|
|
{
|
|
template<>
|
|
struct hash<GUID>
|
|
{
|
|
size_t operator()(const GUID& Value) const
|
|
{
|
|
RPC_STATUS status = RPC_S_OK;
|
|
return ::UuidHash(&const_cast<GUID&>(Value), &status);
|
|
}
|
|
};
|
|
}
|
|
|
|
inline bool operator<(const GUID& guid1, const GUID& guid2)
|
|
{
|
|
if (guid1.Data1 != guid2.Data1)
|
|
{
|
|
return guid1.Data1 < guid2.Data1;
|
|
}
|
|
if (guid1.Data2 != guid2.Data2)
|
|
{
|
|
return guid1.Data2 < guid2.Data2;
|
|
}
|
|
if (guid1.Data3 != guid2.Data3)
|
|
{
|
|
return guid1.Data3 < guid2.Data3;
|
|
}
|
|
for (int i = 0; i < 8; i++)
|
|
{
|
|
if (guid1.Data4[i] != guid2.Data4[i])
|
|
{
|
|
return guid1.Data4[i] < guid2.Data4[i];
|
|
}
|
|
}
|
|
return false;
|
|
}
|