Skip to content

Commit 79ac7cb

Browse files
committed
delete copy constructor and copy assignment op of Model according to the rule of three
1 parent 0ff3719 commit 79ac7cb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

include/dnnlibrary/Model.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#ifndef NNAPIEXAMPLE_MODEL_H
77
#define NNAPIEXAMPLE_MODEL_H
88

9-
#include <memory>
10-
#include <vector>
11-
129
#include <common/Shaper.h>
1310
#include <common/StrKeyMap.h>
1411
#include <dnnlibrary/NeuralNetworksWrapper.h>
1512

13+
#include <memory>
14+
#include <vector>
15+
1616
namespace dnn {
1717
class Model {
1818
friend class ModelBuilder;
@@ -54,6 +54,8 @@ class Model {
5454
void Predict(const std::vector<T *> &inputs);
5555

5656
~Model();
57+
Model(const Model &) = delete;
58+
Model &operator=(const Model &) = delete;
5759
void SetOutputBuffer(const int32_t index, float *buffer);
5860
void SetOutputBuffer(const int32_t index, uint8_t *buffer);
5961
void SetOutputBuffer(const int32_t index, char *buffer);
@@ -64,6 +66,6 @@ class Model {
6466
std::vector<std::string> GetInputs();
6567
std::vector<std::string> GetOutputs();
6668
};
67-
}
69+
} // namespace dnn
6870

6971
#endif // NNAPIEXAMPLE_MODEL_H

0 commit comments

Comments
 (0)