TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
clear_value();
- _value.int_val = new SGRawValueInternal<int>;
_type = INT;
+ _local_val.int_val = 0;
}
switch (_type) {
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
clear_value();
- _value.long_val = new SGRawValueInternal<long>;
_type = LONG;
+ _local_val.long_val = 0L;
}
switch (_type) {
TEST_WRITE;
if (_type == NONE || _type == UNSPECIFIED) {
clear_value();
- _value.float_val = new SGRawValueInternal<float>;
_type = FLOAT;
+ _local_val.float_val = 0;
}
switch (_type) {
bool val = getBoolValue();
clear_value();
_type = BOOL;
- _value.bool_val = new SGRawValueInternal<bool>;
- set_bool(val);
+ _local_val.bool_val = val;
break;
}
case INT: {
int val = getIntValue();
clear_value();
_type = INT;
- _value.int_val = new SGRawValueInternal<int>;
- set_int(val);
+ _local_val.int_val = val;
break;
}
case LONG: {
long val = getLongValue();
clear_value();
_type = LONG;
- _value.long_val = new SGRawValueInternal<long>;
- set_long(val);
+ _local_val.long_val = val;
break;
}
case FLOAT: {
float val = getFloatValue();
clear_value();
_type = FLOAT;
- _value.float_val = new SGRawValueInternal<float>;
- set_float(val);
+ _local_val.float_val = val;
break;
}
case DOUBLE: {
double val = getDoubleValue();
clear_value();
_type = DOUBLE;
- _value.double_val = new SGRawValueInternal<double>;
- set_double(val);
+ _local_val.double_val = val;
break;
}
case STRING:
string val = getStringValue();
clear_value();
_type = STRING;
- _value.string_val = new SGRawValueInternal<string>;
- set_string(val);
+ _local_val.string_val = new string(val);
break;
}
case NONE: