diff --git a/paddle/operators/recurrent_op.h b/paddle/operators/recurrent_op.h index 35e6d9d50dd04048da7ffb384014d5909cd659a4..f859dc333d20ecf04fcb080e459391c8a0122bb1 100644 --- a/paddle/operators/recurrent_op.h +++ b/paddle/operators/recurrent_op.h @@ -19,8 +19,6 @@ namespace paddle { namespace operators { -using namespace paddle::framework; // NOLINT - namespace rnn { /** diff --git a/paddle/platform/device_context.h b/paddle/platform/device_context.h index 48b9f5dcb5cc578f9e70ed7abe076b66b68dc719..08b5b2cff900cc4239a615fe7d7f6b5faa13510b 100644 --- a/paddle/platform/device_context.h +++ b/paddle/platform/device_context.h @@ -55,7 +55,7 @@ class CPUDeviceContext : public DeviceContext { class CUDADeviceContext : public DeviceContext { public: - CUDADeviceContext(GPUPlace); // NOLINT + explicit CUDADeviceContext(GPUPlace); virtual ~CUDADeviceContext(); /*! \brief Wait for all operations completion in the stream. */ diff --git a/paddle/platform/place.h b/paddle/platform/place.h index a37ad38a8fb030192fa4c871106c6eb54816768a..a82e8c942fa28297d91056a66b61f085f2bdb946 100644 --- a/paddle/platform/place.h +++ b/paddle/platform/place.h @@ -32,7 +32,7 @@ struct CPUPlace { struct GPUPlace { GPUPlace() : GPUPlace(0) {} - GPUPlace(int d) : device(d) {} // NOLINT + explicit GPUPlace(int d) : device(d) {} // needed for variant equality comparison inline bool operator==(const GPUPlace &o) const { return device == o.device; } diff --git a/paddle/string/piece.h b/paddle/string/piece.h index 3b887490b5c6c016bc30d8db060c5c1c01b8bf54..7deeacd8ca99da21a34913c67aa66ece0bd7d495 100644 --- a/paddle/string/piece.h +++ b/paddle/string/piece.h @@ -39,8 +39,8 @@ public: // size_ is 0. Piece(); Piece(const char* d, size_t n); - Piece(const char* d); // NOLINT - Piece(const std::string& s); // NOLINT + explicit Piece(const char* d); + explicit Piece(const std::string& s); const char* data() const { return data_; } size_t len() const { return size_; }