Skip to content

Commit

Permalink
override -> final
Browse files Browse the repository at this point in the history
  • Loading branch information
tkonolige committed Mar 8, 2021
1 parent 6a4670f commit fee84a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/contrib/json/json_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class JSONRuntimeBase : public ModuleNode {
LoadGraph(graph_json_);
}

const char* type_key() const override { return "json"; }
const char* type_key() const final { return "json"; }

/*! \brief Initialize a specific json runtime. */
virtual void Init(const Array<NDArray>& consts) = 0;
Expand All @@ -69,7 +69,7 @@ class JSONRuntimeBase : public ModuleNode {
* \param sptr_to_self The pointer to the module node.
* \return The packed function.
*/
PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& sptr_to_self) override {
PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& sptr_to_self) final {
if (name == "get_symbol") {
return PackedFunc(
[sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { *rv = this->symbol_name_; });
Expand Down Expand Up @@ -136,7 +136,7 @@ class JSONRuntimeBase : public ModuleNode {
* \param format the format to return.
* \return A string of JSON.
*/
std::string GetSource(const std::string& format = "json") override { return graph_json_; }
std::string GetSource(const std::string& format = "json") final { return graph_json_; }

protected:
/*!
Expand Down

0 comments on commit fee84a8

Please sign in to comment.