Core/DBLayer: Optimized prepared statement query results by eliminating unneeded buffer copies

* Improved error logs for using incorrect Field getters to also include table name, field name and field index.
This commit is contained in:
Shauren
2015-08-26 17:00:26 +02:00
parent 614b5832ba
commit 65dbc7082a
5 changed files with 130 additions and 94 deletions

View File

@@ -30,18 +30,11 @@ Field::~Field()
CleanUp();
}
void Field::SetByteValue(const void* newValue, const size_t newSize, enum_field_types newType, uint32 length)
void Field::SetByteValue(void* newValue, enum_field_types newType, uint32 length)
{
if (data.value)
CleanUp();
// This value stores raw bytes that have to be explicitly cast later
if (newValue)
{
data.value = new char[newSize];
memcpy(data.value, newValue, newSize);
data.length = length;
}
data.value = newValue;
data.length = length;
data.type = newType;
data.raw = true;
}