From 78c75de22ced477e7a42507debc79f68eb9ea411 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Thu, 3 Jul 2014 15:04:04 +0200 Subject: [PATCH] tutorial.cpp: update for FindMember change * use MemberIterator instead of plain pointer * check against MemberEnd() instead of NULL --- example/tutorial/tutorial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/tutorial/tutorial.cpp b/example/tutorial/tutorial.cpp index 592543e..c0aca10 100644 --- a/example/tutorial/tutorial.cpp +++ b/example/tutorial/tutorial.cpp @@ -44,8 +44,8 @@ int main(int, char*[]) { printf("hello = %s\n", document["hello"].GetString()); // Since version 0.2, you can use single lookup to check the existing of member and its value: - Value::Member* hello = document.FindMember("hello"); - assert(hello != 0); + Value::MemberIterator hello = document.FindMember("hello"); + assert(hello != document.MemberEnd()); assert(hello->value.IsString()); assert(strcmp("world", hello->value.GetString()) == 0); (void)hello;