port to C17/C++20
This commit is contained in:
@@ -266,7 +266,7 @@ namespace hgl
|
||||
const int hash_bytes=hash_code_bytes[(size_t)ha];
|
||||
|
||||
uint8 *hash_code=new uint8[hash_bytes];
|
||||
char *hash_code_str=new char[1+(hash_bytes<<1)];
|
||||
u8char *hash_code_str=new u8char[1+(hash_bytes<<1)];
|
||||
|
||||
h->Init();
|
||||
h->Update(data,size);
|
||||
|
@@ -37,7 +37,7 @@ namespace hgl
|
||||
|
||||
public:
|
||||
|
||||
void GetName(UTF8String &str)const override{str="SHA1LE";}
|
||||
void GetName(UTF8String &str)const override{str=U8_TEXT("SHA1LE");}
|
||||
void GetName(UTF16String &str)const override{str=U16_TEXT("SHA1LE");}
|
||||
|
||||
const int GetHashBytes()const override {return DIGEST_SIZE;}
|
||||
|
@@ -280,10 +280,10 @@ namespace hgl
|
||||
return pa_map.Add(name,attr);
|
||||
}
|
||||
|
||||
bool Add(const PString &str)
|
||||
{
|
||||
return Add(pa_name,str);
|
||||
}
|
||||
//bool Add(const PString &str)
|
||||
//{
|
||||
// return Add(pa_name,str);
|
||||
//}
|
||||
|
||||
PAttribBase<C> *Get(const PString &name){return GetObjectFromList(pa_map,name);}
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace hgl
|
||||
};
|
||||
};//template<typename C> class PAttribSet
|
||||
|
||||
using UTF8PAttribSet =PAttribSet<char>;
|
||||
using UTF8PAttribSet =PAttribSet<u8char>;
|
||||
using UTF16PAttribSet =PAttribSet<u16char>;
|
||||
using WidePAttribSet =PAttribSet<wchar_t>;
|
||||
using OSPAttribSet =PAttribSet<os_char>;
|
||||
|
@@ -17,7 +17,7 @@ namespace hgl
|
||||
|
||||
protected:
|
||||
|
||||
Map<AnsiString,ElementCreater *> ecs_map;
|
||||
Map<UTF8String,ElementCreater *> ecs_map;
|
||||
|
||||
virtual ElementCreater *GetSubElementCreater(const UTF8String &sub_name);
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace hgl
|
||||
{
|
||||
Stack<ElementCreater *> ecs_stack;
|
||||
|
||||
Map<AnsiString,ElementCreater *> ecs_map;
|
||||
Map<UTF8String,ElementCreater *> ecs_map;
|
||||
|
||||
ElementCreater *cur_ec;
|
||||
|
||||
|
Reference in New Issue
Block a user