fix initializations.

This commit is contained in:
hecomi
2020-03-14 19:19:35 +09:00
parent cfdfb1f50e
commit b4135c317f
7 changed files with 16 additions and 16 deletions
@@ -33,7 +33,7 @@ class ScopedReleaser
public:
using ReleaseFuncType = std::function<void()>;
ScopedReleaser(ReleaseFuncType&& func) : func_(func) {}
~ScopedReleaser() { func_(); }
virtual ~ScopedReleaser() { func_(); }
private:
const ReleaseFuncType func_;
@@ -48,7 +48,7 @@ public:
using microseconds = std::chrono::microseconds;
using TimerFuncType = std::function<void(microseconds)>;
ScopedTimer(TimerFuncType&& func);
~ScopedTimer();
virtual ~ScopedTimer();
private:
const TimerFuncType func_;
@@ -71,7 +71,7 @@ void SendMessageToUnity(Message message);
// Buffer
template <class T>
class Buffer
class Buffer final
{
public:
Buffer()
@@ -99,7 +99,7 @@ void Cursor::UpdateTexture(
bgraBuffer_.ExpandIfNeeded(bgraBufferSize);
// Check buffers
if (!bgraBuffer_ || !buffer_)
if (!bgraBuffer_ || !buffer_)
{
Debug::Error("Cursor::UpdateTexture() => no buffer.");
return;
@@ -9,7 +9,7 @@
class Duplicator;
class Cursor
class Cursor final
{
public:
explicit Cursor();
@@ -39,7 +39,7 @@ private:
int y_ = -1;
Buffer<BYTE> buffer_;
Buffer<BYTE> bgraBuffer_;
DXGI_OUTDUPL_POINTER_SHAPE_INFO shapeInfo_;
LARGE_INTEGER timestamp_;
D3D11_BOX capturedImageArea_;
DXGI_OUTDUPL_POINTER_SHAPE_INFO shapeInfo_ = {};
LARGE_INTEGER timestamp_ = {};
D3D11_BOX capturedImageArea_ = {};
};
@@ -8,7 +8,7 @@
// Thraed safe self created ID3D11Device from specified adapter
class IsolatedD3D11Device
class IsolatedD3D11Device final
{
public:
IsolatedD3D11Device();
@@ -30,7 +30,7 @@ enum class DuplicatorState
};
class Duplicator
class Duplicator final
{
public:
using State = DuplicatorState;
@@ -83,7 +83,7 @@ private:
std::shared_ptr<class IsolatedD3D11Device> device_;
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> dupl_;
Frame lastFrame_;
Frame lastFrame_ = {};
UINT lastFrameId_ = 0;
bool isFrameAcquired_ = false;
@@ -91,5 +91,5 @@ private:
std::thread thread_;
mutable std::mutex mutex_;
Metadata metaData_;
Metadata metaData_ = {};
};
@@ -13,7 +13,7 @@ class MonitorManager;
enum class DuplicatorState;
class Monitor
class Monitor final
{
public:
explicit Monitor(int id);
@@ -68,8 +68,8 @@ private:
Microsoft::WRL::ComPtr<IDXGIOutput> output_;
Microsoft::WRL::ComPtr<IDXGIAdapter> adapter_;
DXGI_OUTPUT_DESC outputDesc_;
MONITORINFOEX monitorInfo_;
DXGI_OUTPUT_DESC outputDesc_ = {};
MONITORINFOEX monitorInfo_ = {};
std::shared_ptr<class Duplicator> duplicator_;
UINT lastFrameId_ = -1;
@@ -10,7 +10,7 @@ struct IUnityInterfaces;
class Monitor;
class Cursor;
class MonitorManager
class MonitorManager final
{
public:
MonitorManager();