From caf9271140ca5488f28393da369b410462bf8841 Mon Sep 17 00:00:00 2001 From: klaus triendl Date: Fri, 18 Mar 2016 11:02:24 +1100 Subject: [PATCH] #4 define json::value methods inline --- include/cpp-json/value.tcc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cpp-json/value.tcc b/include/cpp-json/value.tcc index c8540f7..34b2ca6 100644 --- a/include/cpp-json/value.tcc +++ b/include/cpp-json/value.tcc @@ -281,7 +281,7 @@ inline std::string &value::as_string() { //------------------------------------------------------------------------------ // Name: as_object //------------------------------------------------------------------------------ -const object &value::as_object() const { +inline const object &value::as_object() const { if(type_ != type_object) { throw invalid_type_cast(); } @@ -291,7 +291,7 @@ const object &value::as_object() const { //------------------------------------------------------------------------------ // Name: as_object //------------------------------------------------------------------------------ -object &value::as_object() { +inline object &value::as_object() { if(type_ != type_object) { throw invalid_type_cast(); } @@ -301,7 +301,7 @@ object &value::as_object() { //------------------------------------------------------------------------------ // Name: as_array //------------------------------------------------------------------------------ -const array &value::as_array() const { +inline const array &value::as_array() const { if(type_ != type_array) { throw invalid_type_cast(); } @@ -311,7 +311,7 @@ const array &value::as_array() const { //------------------------------------------------------------------------------ // Name: as_array //------------------------------------------------------------------------------ -array &value::as_array() { +inline array &value::as_array() { if(type_ != type_array) { throw invalid_type_cast(); }