Skip to content

Commit

Permalink
Move copy operators to public and add const keyword to ICodegen funct…
Browse files Browse the repository at this point in the history
…ions

ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
  • Loading branch information
jyoungyun committed Jan 29, 2024
1 parent 7560bd0 commit ed1cf0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/onert/core/include/odc/ICodegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ICodegen
public:
virtual ~ICodegen() = default;

virtual int codegen(const char *in, const char *out) = 0;
virtual int codegen(const char *in, const char *out) const = 0;
};

} // namespace odc
Expand Down
8 changes: 5 additions & 3 deletions runtime/onert/core/src/odc/CodegenLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ class CodegenLoader
*/
static CodegenLoader &instance();

// delete copy constructor and assignment operator
CodegenLoader(CodegenLoader const &) = delete;
CodegenLoader &operator=(CodegenLoader const &) = delete;

private:
// cannot create instance of CodegenLoader outside of this class
CodegenLoader() = default;
CodegenLoader(CodegenLoader const &) = delete;
CodegenLoader &operator=(CodegenLoader const &) = delete;
~CodegenLoader() = default;

public:
Expand All @@ -80,7 +82,7 @@ class CodegenLoader
* @brief Get instance of ICodegen created through factory method
* @return Pointer to instance of ICodegen
*/
ICodegen *get() const { return _codegen.get(); }
const ICodegen *get() const { return _codegen.get(); }

private:
// Note: Keep handle to avoid svace warning of "handle lost without dlclose()"
Expand Down

0 comments on commit ed1cf0d

Please sign in to comment.