mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
21 lines
328 B
C++
21 lines
328 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
#define LDUMP(x) x
|
|
|
|
template <class T>
|
|
String AsHash(const T& x)
|
|
{
|
|
Sha1Stream s;
|
|
const_cast<T&>(x).Serialize(s);
|
|
return s.FinishString();
|
|
}
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
Pointf x(1, 2);
|
|
DDUMP(AsHash(x));
|
|
DDUMP(AsHash(Pointf(1, 2)));
|
|
DDUMP(AsHash(Pointf(2, 2)));
|
|
}
|