8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Avoid const_cast.

This commit is contained in:
robocop 2008-04-22 11:28:16 +00:00
parent a3e8480380
commit cd2e3a1862

View File

@ -73,8 +73,9 @@ static bool texttype_default_init(texttype* tt,
} }
// name comes from stack. Copy it. // name comes from stack. Copy it.
tt->texttype_name = FB_NEW(*getDefaultMemoryPool()) ASCII[strlen(name) + 1]; ASCII* p = FB_NEW(*getDefaultMemoryPool()) ASCII[strlen(name) + 1];
strcpy(const_cast<ASCII*>(tt->texttype_name), name); strcpy(p, name);
tt->texttype_name = p;
tt->texttype_version = TEXTTYPE_VERSION_1; tt->texttype_version = TEXTTYPE_VERSION_1;
tt->texttype_country = CC_INTL; tt->texttype_country = CC_INTL;