mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 14:59:44 +03:00
test: Remove using namespace in header files
"using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in header files in test. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
af60569cbc
commit
1526650fc7
16 changed files with 33 additions and 35 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class GstreamerTest
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
BufferSource::BufferSource()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -12,20 +12,18 @@
|
|||
#include "libcamera/internal/media_device.h"
|
||||
#include "libcamera/internal/v4l2_videodevice.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class BufferSource
|
||||
{
|
||||
public:
|
||||
BufferSource();
|
||||
~BufferSource();
|
||||
|
||||
int allocate(const StreamConfiguration &config);
|
||||
const std::vector<std::unique_ptr<FrameBuffer>> &buffers();
|
||||
int allocate(const libcamera::StreamConfiguration &config);
|
||||
const std::vector<std::unique_ptr<libcamera::FrameBuffer>> &buffers();
|
||||
|
||||
private:
|
||||
std::shared_ptr<MediaDevice> media_;
|
||||
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
|
||||
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||
std::vector<std::unique_ptr<libcamera::FrameBuffer>> buffers_;
|
||||
};
|
||||
|
||||
#endif /* __LIBCAMERA_BUFFER_SOURCE_TEST_H__ */
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
#include <libcamera/camera.h>
|
||||
#include <libcamera/camera_manager.h>
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class CameraTest
|
||||
{
|
||||
public:
|
||||
|
@ -21,8 +19,8 @@ public:
|
|||
~CameraTest();
|
||||
|
||||
protected:
|
||||
CameraManager *cm_;
|
||||
std::shared_ptr<Camera> camera_;
|
||||
libcamera::CameraManager *cm_;
|
||||
std::shared_ptr<libcamera::Camera> camera_;
|
||||
int status_;
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class MediaDeviceTest : public Test
|
||||
{
|
||||
public:
|
||||
|
@ -25,10 +23,10 @@ public:
|
|||
protected:
|
||||
int init();
|
||||
|
||||
std::shared_ptr<MediaDevice> media_;
|
||||
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||
|
||||
private:
|
||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
||||
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||
};
|
||||
|
||||
#endif /* __LIBCAMERA_MEDIADEVICE_TEST_H__ */
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class SerializationTest : public CameraTest, public Test
|
||||
{
|
||||
public:
|
||||
|
@ -24,10 +22,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
static bool equals(const ControlInfoMap &lhs,
|
||||
const ControlInfoMap &rhs);
|
||||
static bool equals(const ControlList &lhs,
|
||||
const ControlList &rhs);
|
||||
static bool equals(const libcamera::ControlInfoMap &lhs,
|
||||
const libcamera::ControlInfoMap &rhs);
|
||||
static bool equals(const libcamera::ControlList &lhs,
|
||||
const libcamera::ControlList &rhs);
|
||||
};
|
||||
|
||||
#endif /* __LIBCAMERA_SERIALIZATION_TEST_H__ */
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class V4L2SubdeviceTest : public Test
|
||||
{
|
||||
public:
|
||||
|
@ -30,9 +28,9 @@ protected:
|
|||
int init() override;
|
||||
void cleanup() override;
|
||||
|
||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
||||
std::shared_ptr<MediaDevice> media_;
|
||||
V4L2Subdevice *scaler_;
|
||||
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||
libcamera::V4L2Subdevice *scaler_;
|
||||
};
|
||||
|
||||
#endif /* __LIBCAMERA_V4L2_SUBDEVICE_TEST_H__ */
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "v4l2_videodevice_test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class BufferSharingTest : public V4L2VideoDeviceTest
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
#include "v4l2_videodevice_test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class CaptureAsyncTest : public V4L2VideoDeviceTest
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
class V4L2VideoDeviceTest : public Test
|
||||
{
|
||||
public:
|
||||
|
@ -36,12 +34,12 @@ protected:
|
|||
|
||||
std::string driver_;
|
||||
std::string entity_;
|
||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
||||
std::shared_ptr<MediaDevice> media_;
|
||||
CameraSensor *sensor_;
|
||||
V4L2Subdevice *debayer_;
|
||||
V4L2VideoDevice *capture_;
|
||||
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
|
||||
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||
libcamera::CameraSensor *sensor_;
|
||||
libcamera::V4L2Subdevice *debayer_;
|
||||
libcamera::V4L2VideoDevice *capture_;
|
||||
std::vector<std::unique_ptr<libcamera::FrameBuffer>> buffers_;
|
||||
};
|
||||
|
||||
#endif /* __LIBCAMERA_V4L2_DEVICE_TEST_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue