summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Pankow <brad@livio.io>2016-07-25 14:54:05 -0400
committerBrad Pankow <brad@livio.io>2016-07-26 13:27:44 -0400
commit9bfffdea3c545b8573b113442b7c70f9cf642d29 (patch)
treeb414b2747b718cb9c9aa8c5551c03bec770ce000 /src
parent4e7df81d55146328ae2b4c3a01cbddd1e4db74f9 (diff)
downloadsdl_core-9bfffdea3c545b8573b113442b7c70f9cf642d29.tar.gz
Initialize policy_table_type_ to INVALID_PT_TYPE for Optional template class (CID 80046, 80047, 80048)
Diffstat (limited to 'src')
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_inl.h6
-rw-r--r--src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
index 2241a4707b..4112c95474 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_inl.h
@@ -574,13 +574,15 @@ void Nullable<T>::ReportErrors(ValidationReport* report) const {
* Optional class
*/
template<typename T>
-Optional<T>::Optional() {
+Optional<T>::Optional()
+ : policy_table_type_(policy_table_interface_base::INVALID_PT_TYPE) {
}
template<typename T>
template<typename U>
Optional<T>::Optional(const U& value)
- : value_(value) {
+ : policy_table_type_(policy_table_interface_base::INVALID_PT_TYPE),
+ value_(value) {
}
template<typename T>
diff --git a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
index b5fd9a567a..1e1bdadb4f 100644
--- a/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
+++ b/src/components/rpc_base/include/rpc_base/rpc_base_json_inl.h
@@ -356,7 +356,8 @@ inline Json::Value Nullable<T>::ToJsonValue() const {
template<typename T>
template<typename U>
Optional<T>::Optional(const Json::Value* value, const U& def_value)
- : value_(value, def_value) {
+ : policy_table_type_(policy_table_interface_base::INVALID_PT_TYPE),
+ value_(value, def_value) {
}
template<typename T>