Commit 6086ec0c authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot 3

Clean up deprecation warnings

Summary:Clean up a deprecation warning for JSONSchema's use of
Singleton. This is in experimental, so the interface change should be
reasonable..

Reviewed By: agoder

Differential Revision: D3203348

fb-gh-sync-id: 3283c7d9c507a545f3217eb5afc3734eb047b833
fbshipit-source-id: 3283c7d9c507a545f3217eb5afc3734eb047b833
parent 7ea1d04a
...@@ -1020,6 +1020,8 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema) { ...@@ -1020,6 +1020,8 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema) {
return std::move(v); return std::move(v);
} }
Validator* makeSchemaValidator() { return schemaValidator.get(); } std::shared_ptr<Validator> makeSchemaValidator() {
return schemaValidator.try_get();
}
} }
} }
...@@ -68,6 +68,6 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema); ...@@ -68,6 +68,6 @@ std::unique_ptr<Validator> makeValidator(const dynamic& schema);
* Makes a validator for schemas. You should probably check your schema with * Makes a validator for schemas. You should probably check your schema with
* this before you use makeValidator(). * this before you use makeValidator().
*/ */
Validator* makeSchemaValidator(); std::shared_ptr<Validator> makeSchemaValidator();
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment