Use buffer in STBlob

This commit is contained in:
seelabs
2015-03-12 11:54:15 -07:00
committed by Tom Ritchford
parent 8ca9fa1c26
commit 803f5b5613
10 changed files with 102 additions and 77 deletions

View File

@@ -388,6 +388,8 @@ private:
template <typename T, typename V>
void setFieldUsingSetValue (SField::ref field, V value)
{
static_assert(!std::is_lvalue_reference<V>::value, "");
STBase* rf = getPField (field, true);
if (!rf)
@@ -401,7 +403,7 @@ private:
if (!cf)
throw std::runtime_error ("Wrong field type");
cf->setValue (value);
cf->setValue (std::move (value));
}
// Implementation for setting fields using assignment