diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 22:25:22 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:05:21 +0200 |
commit | d65936200a2756e6619a109fa6fa673b91df802e (patch) | |
tree | 80b6b6fc7ba9023cbe47290b8ae1bc5468a19bb1 /compat/camera-names.cpp | |
parent | 4046773c41ee3c0f65840828ab983cfd13451c85 (diff) |
modernize C++ syntax
No visible changes (hopefully).
Diffstat (limited to 'compat/camera-names.cpp')
-rw-r--r-- | compat/camera-names.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp index 22dcdd8f..c88bae75 100644 --- a/compat/camera-names.cpp +++ b/compat/camera-names.cpp @@ -33,30 +33,30 @@ OTR_COMPAT_EXPORT QList<QString> get_camera_names() // Create the System Device Enumerator. HRESULT hr; CoInitialize(nullptr); - ICreateDevEnum *pSysDevEnum = NULL; - hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum); + ICreateDevEnum *pSysDevEnum = nullptr; + hr = CoCreateInstance(CLSID_SystemDeviceEnum, nullptr, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum); if (FAILED(hr)) { qDebug() << "failed CLSID_SystemDeviceEnum" << hr; return ret; } // Obtain a class enumerator for the video compressor category. - IEnumMoniker *pEnumCat = NULL; + IEnumMoniker *pEnumCat = nullptr; hr = pSysDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnumCat, 0); if (hr == S_OK) { // Enumerate the monikers. - IMoniker *pMoniker = NULL; + IMoniker *pMoniker = nullptr; ULONG cFetched; while (pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) { IPropertyBag *pPropBag; - hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pPropBag); + hr = pMoniker->BindToStorage(nullptr, nullptr, IID_IPropertyBag, (void **)&pPropBag); if (SUCCEEDED(hr)) { // To retrieve the filter's friendly name, do the following: VARIANT varName; VariantInit(&varName); - hr = pPropBag->Read(L"FriendlyName", &varName, 0); + hr = pPropBag->Read(L"FriendlyName", &varName, nullptr); if (SUCCEEDED(hr)) { // Display the name in your UI somehow. |