style: update some comments and indentation
This commit is contained in:
parent
6680e9d8f8
commit
280fea2560
@ -50,8 +50,8 @@ class resolver
|
|||||||
if (schema_refs.find(id) != schema_refs.end())
|
if (schema_refs.find(id) != schema_refs.end())
|
||||||
throw std::invalid_argument("schema " + id.to_string() + " already present in local resolver");
|
throw std::invalid_argument("schema " + id.to_string() + " already present in local resolver");
|
||||||
|
|
||||||
// store a raw pointer to this (sub-)schema references by its absolute json_uri
|
// store a raw pointer to this (sub-)schema referenced by its absolute json_uri
|
||||||
// this (sub-)schema is part of a schema stored inside schema_store_
|
// this (sub-)schema is part of a schema stored inside schema_store_ so we can the a raw-pointer-ref
|
||||||
schema_refs[id] = &schema;
|
schema_refs[id] = &schema;
|
||||||
|
|
||||||
for (auto i = schema.begin(), end = schema.end(); i != end; ++i) {
|
for (auto i = schema.begin(), end = schema.end(); i != end; ++i) {
|
||||||
@ -126,10 +126,7 @@ void validate_type(const json &schema, const std::string &expected_type, const s
|
|||||||
{
|
{
|
||||||
const auto &type_it = schema.find("type");
|
const auto &type_it = schema.find("type");
|
||||||
if (type_it == schema.end())
|
if (type_it == schema.end())
|
||||||
/* TODO guess type for more safety,
|
/* TODO something needs to be done here, I think */
|
||||||
* TODO use definitions
|
|
||||||
* TODO valid by not being defined? FIXME not clear - there are
|
|
||||||
* schema-test case which are not specifying a type */
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto &type_instance = type_it.value();
|
const auto &type_instance = type_it.value();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user