Skip to content

Commit

Permalink
[C++][Pistache] Add missing 'override' on virtual methods
Browse files Browse the repository at this point in the history
This is following OpenAPITools#15279
Marking those methods 'override' should avoid producing
'-Winconsistent-missing-override' warnings or similar.
  • Loading branch information
sjoubert committed May 10, 2023
1 parent bb8098a commit 110a695
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace {{apiNamespace}}
class {{declspec}} {{classname}} : public ApiBase {
public:
explicit {{classname}}(const std::shared_ptr<Pistache::Rest::Router>& rtr);
virtual ~{{classname}}() = default;
void init();
~{{classname}}() override = default;
void init() override;

static const std::string base;

Expand Down
4 changes: 2 additions & 2 deletions samples/server/petstore/cpp-pistache/api/PetApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace org::openapitools::server::api
class PetApi : public ApiBase {
public:
explicit PetApi(const std::shared_ptr<Pistache::Rest::Router>& rtr);
virtual ~PetApi() = default;
void init();
~PetApi() override = default;
void init() override;

static const std::string base;

Expand Down
4 changes: 2 additions & 2 deletions samples/server/petstore/cpp-pistache/api/StoreApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace org::openapitools::server::api
class StoreApi : public ApiBase {
public:
explicit StoreApi(const std::shared_ptr<Pistache::Rest::Router>& rtr);
virtual ~StoreApi() = default;
void init();
~StoreApi() override = default;
void init() override;

static const std::string base;

Expand Down
4 changes: 2 additions & 2 deletions samples/server/petstore/cpp-pistache/api/UserApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace org::openapitools::server::api
class UserApi : public ApiBase {
public:
explicit UserApi(const std::shared_ptr<Pistache::Rest::Router>& rtr);
virtual ~UserApi() = default;
void init();
~UserApi() override = default;
void init() override;

static const std::string base;

Expand Down

0 comments on commit 110a695

Please sign in to comment.