From 79ac7cb378775ea46766b7bf8c5a46083ba507af Mon Sep 17 00:00:00 2001 From: daquexian Date: Mon, 25 Nov 2019 09:53:18 +0800 Subject: [PATCH] delete copy constructor and copy assignment op of Model according to the rule of three --- include/dnnlibrary/Model.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/dnnlibrary/Model.h b/include/dnnlibrary/Model.h index 91761a2..5a03a40 100644 --- a/include/dnnlibrary/Model.h +++ b/include/dnnlibrary/Model.h @@ -6,13 +6,13 @@ #ifndef NNAPIEXAMPLE_MODEL_H #define NNAPIEXAMPLE_MODEL_H -#include -#include - #include #include #include +#include +#include + namespace dnn { class Model { friend class ModelBuilder; @@ -54,6 +54,8 @@ class Model { void Predict(const std::vector &inputs); ~Model(); + Model(const Model &) = delete; + Model &operator=(const Model &) = delete; void SetOutputBuffer(const int32_t index, float *buffer); void SetOutputBuffer(const int32_t index, uint8_t *buffer); void SetOutputBuffer(const int32_t index, char *buffer); @@ -64,6 +66,6 @@ class Model { std::vector GetInputs(); std::vector GetOutputs(); }; -} +} // namespace dnn #endif // NNAPIEXAMPLE_MODEL_H