1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Remove dangerous string manipulation, merge declaration with assignment

This commit is contained in:
Dmitry-Me
2015-03-04 10:35:06 +03:00
parent 62b8895814
commit f8c454733b
+2 -6
View File
@@ -549,13 +549,9 @@ String tempfile( const char* suffix )
#if defined WIN32 || defined _WIN32
#ifdef WINRT
RoInitialize(RO_INIT_MULTITHREADED);
std::wstring temp_dir = L"";
const wchar_t* opencv_temp_dir = GetTempPathWinRT().c_str();
if (opencv_temp_dir)
temp_dir = std::wstring(opencv_temp_dir);
std::wstring temp_dir = GetTempPathWinRT();
std::wstring temp_file;
temp_file = GetTempFileNameWinRT(L"ocv");
std::wstring temp_file = GetTempFileNameWinRT(L"ocv");
if (temp_file.empty())
return String();