From 3681c44aa3a15181b0acde8e5da865fb37eb9e66 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 7 Nov 2015 23:14:12 +0900 Subject: [PATCH] Update README. --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ee59f6..10ba57a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Tiny but poweful single file wavefront obj loader written in C++. No dependency What's new ---------- +* Nov 08, 2015 : Improved API. * Jun 23, 2015 : Various fixes and added more projects using tinyobjloader. Thanks many contributors! * Mar 03, 2015 : Replace atof() with hand-written parser for robust reading of numeric value. Thanks skurmedel! * Feb 06, 2015 : Fix parsing multi-material object @@ -85,10 +86,14 @@ Usage std::vector shapes; std::vector materials; - std::string err = tinyobj::LoadObj(shapes, materials, inputfile.c_str()); + std::string err; + bool ret = tinyobj::LoadObj(shapes, materials, inputfile.c_str()); - if (!err.empty()) { + if (!err.empty()) { // `err` may contain warning message. std::cerr << err << std::endl; + } + + if (!ret) { exit(1); }