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

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp')
-rw-r--r--Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp b/Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp
index f380d7be..3b03eded 100644
--- a/Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp
+++ b/Source/Ogda/Searchers/Seekers/jsonseekerbase.cpp
@@ -27,25 +27,18 @@
#include <fstream>
#include <string>
-std::vector<Item> JSONSeekerBase::Search(const Item& item)
-{
+std::vector<Item> JSONSeekerBase::Search(const Item& item) {
std::fstream fs(item.GetAbsPath().c_str(), std::fstream::in);
- if( fs.good() )
- {
+ if (fs.good()) {
SimpleJSONWrapper json;
std::string err;
- if( json.parseIstream( fs, err ) )
- {
- return SearchJSON(item, json.getRoot() );
- }
- else
- {
+ if (json.parseIstream(fs, err)) {
+ return SearchJSON(item, json.getRoot());
+ } else {
LOGE << "Unable to parse " << item << " in json parser, reason: " << err << std::endl;
}
- }
- else
- {
+ } else {
LOGE << "Unable to open " << item << " in json parser" << std::endl;
return std::vector<Item>();
}