Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2014-06-29 10:18:33 +0400
committerMilo Yip <miloyip@gmail.com>2014-06-29 10:18:33 +0400
commit6f306755d5b7503d2fb6fb88aecbcc5534babdf7 (patch)
tree8f70ac93de125df01976070db9715f3e06bd60fa /example
parent8a959c3898773d0c6dceb84eaf71e47b45d0c6d0 (diff)
Minor adjustment to simpledom example
Showing the type Value and preventing member lookup twice.
Diffstat (limited to 'example')
-rw-r--r--example/simpledom/simpledom.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/simpledom/simpledom.cpp b/example/simpledom/simpledom.cpp
index 56be032d..de2dc660 100644
--- a/example/simpledom/simpledom.cpp
+++ b/example/simpledom/simpledom.cpp
@@ -15,7 +15,8 @@ int main() {
d.Parse<0>(json);
// 2. Modify it by DOM.
- d["stars"].SetInt(d["stars"].GetInt() + 1);
+ Value& s = d["stars"];
+ s.SetInt(s.GetInt() + 1);
// 3. Stringify the DOM
StringBuffer buffer;