parent
							
								
									22d0fd4e2a
								
							
						
					
					
						commit
						597f33a9fb
					
				|  | @ -126,7 +126,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -138,7 +138,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -153,7 +153,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -170,7 +170,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  |  | ||||||
|  | @ -80,7 +80,7 @@ namespace kiwano | ||||||
| 
 | 
 | ||||||
| 			LPVOID buffer; | 			LPVOID buffer; | ||||||
| 			DWORD buffer_size; | 			DWORD buffer_size; | ||||||
| 			if (!res.Load(buffer, buffer_size)) { return false; } | 			if (!res.Load(buffer, buffer_size)) { return E_FAIL; } | ||||||
| 
 | 
 | ||||||
| 			stream = kiwano::modules::Shlwapi::Get().SHCreateMemStream( | 			stream = kiwano::modules::Shlwapi::Get().SHCreateMemStream( | ||||||
| 				static_cast<const BYTE*>(buffer), | 				static_cast<const BYTE*>(buffer), | ||||||
|  |  | ||||||
|  | @ -28,6 +28,8 @@ namespace kiwano | ||||||
| 		namespace modules | 		namespace modules | ||||||
| 		{ | 		{ | ||||||
| 			XAudio2::XAudio2() | 			XAudio2::XAudio2() | ||||||
|  | 				: xaudio2(nullptr) | ||||||
|  | 				, XAudio2Create(nullptr) | ||||||
| 			{ | 			{ | ||||||
| 				const auto xaudio2_dll_names = | 				const auto xaudio2_dll_names = | ||||||
| 				{ | 				{ | ||||||
|  | @ -55,6 +57,15 @@ namespace kiwano | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			MediaFoundation::MediaFoundation() | 			MediaFoundation::MediaFoundation() | ||||||
|  | 				: mfplat(nullptr) | ||||||
|  | 				, mfreadwrite(nullptr) | ||||||
|  | 				, MFStartup(nullptr) | ||||||
|  | 				, MFShutdown(nullptr) | ||||||
|  | 				, MFCreateMediaType(nullptr) | ||||||
|  | 				, MFCreateWaveFormatExFromMFMediaType(nullptr) | ||||||
|  | 				, MFCreateSourceReaderFromURL(nullptr) | ||||||
|  | 				, MFCreateSourceReaderFromByteStream(nullptr) | ||||||
|  | 				, MFCreateMFByteStreamOnStream(nullptr) | ||||||
| 			{ | 			{ | ||||||
| 				mfplat = LoadLibraryW(L"Mfplat.dll"); | 				mfplat = LoadLibraryW(L"Mfplat.dll"); | ||||||
| 				if (mfplat) | 				if (mfplat) | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -147,7 +147,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -162,7 +162,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -179,7 +179,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  |  | ||||||
|  | @ -259,8 +259,12 @@ static void ImGui_ImplDX11_CreateFontsTexture() | ||||||
|         subResource.pSysMem = pixels; |         subResource.pSysMem = pixels; | ||||||
|         subResource.SysMemPitch = desc.Width * 4; |         subResource.SysMemPitch = desc.Width * 4; | ||||||
|         subResource.SysMemSlicePitch = 0; |         subResource.SysMemSlicePitch = 0; | ||||||
|         g_pd3dDevice->CreateTexture2D(&desc, &subResource, &pTexture); |         kiwano::ThrowIfFailed( | ||||||
|  |             g_pd3dDevice->CreateTexture2D(&desc, &subResource, &pTexture) | ||||||
|  |         ); | ||||||
| 
 | 
 | ||||||
|  |         if (pTexture) | ||||||
|  |         { | ||||||
|             // Create texture view
 |             // Create texture view
 | ||||||
|             D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; |             D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc; | ||||||
|             ZeroMemory(&srvDesc, sizeof(srvDesc)); |             ZeroMemory(&srvDesc, sizeof(srvDesc)); | ||||||
|  | @ -268,9 +272,13 @@ static void ImGui_ImplDX11_CreateFontsTexture() | ||||||
|             srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; |             srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; | ||||||
|             srvDesc.Texture2D.MipLevels = desc.MipLevels; |             srvDesc.Texture2D.MipLevels = desc.MipLevels; | ||||||
|             srvDesc.Texture2D.MostDetailedMip = 0; |             srvDesc.Texture2D.MostDetailedMip = 0; | ||||||
|         g_pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, &g_pFontTextureView); |             kiwano::ThrowIfFailed( | ||||||
|  |                 g_pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, &g_pFontTextureView) | ||||||
|  |             ); | ||||||
|  | 
 | ||||||
|             pTexture->Release(); |             pTexture->Release(); | ||||||
|         } |         } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     // Store our identifier
 |     // Store our identifier
 | ||||||
|     io.Fonts->TexID = (ImTextureID)g_pFontTextureView; |     io.Fonts->TexID = (ImTextureID)g_pFontTextureView; | ||||||
|  |  | ||||||
|  | @ -124,7 +124,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -136,7 +136,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -151,7 +151,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  | @ -168,7 +168,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> |       <AdditionalIncludeDirectories>../</AdditionalIncludeDirectories> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|  |  | ||||||
|  | @ -258,9 +258,7 @@ namespace kiwano | ||||||
| 	//-------------------------------------------------------
 | 	//-------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
| 	ActionScaleBy::ActionScaleBy(Duration duration, float scale, EaseFunc func) | 	ActionScaleBy::ActionScaleBy(Duration duration, float scale, EaseFunc func) | ||||||
| 		: ActionTween(duration, func) | 		: ActionScaleBy(duration, scale, scale, func) | ||||||
| 		, delta_x_(scale) |  | ||||||
| 		, delta_y_(scale) |  | ||||||
| 	{ | 	{ | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -268,6 +266,8 @@ namespace kiwano | ||||||
| 		: ActionTween(duration, func) | 		: ActionTween(duration, func) | ||||||
| 		, delta_x_(scale_x) | 		, delta_x_(scale_x) | ||||||
| 		, delta_y_(scale_y) | 		, delta_y_(scale_y) | ||||||
|  | 		, start_scale_x_(0.f) | ||||||
|  | 		, start_scale_y_(0.f) | ||||||
| 	{ | 	{ | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | @ -329,6 +329,7 @@ namespace kiwano | ||||||
| 	ActionFadeTo::ActionFadeTo(Duration duration, float opacity, EaseFunc func) | 	ActionFadeTo::ActionFadeTo(Duration duration, float opacity, EaseFunc func) | ||||||
| 		: ActionTween(duration, func) | 		: ActionTween(duration, func) | ||||||
| 		, delta_val_(0.f) | 		, delta_val_(0.f) | ||||||
|  | 		, start_val_(0.f) | ||||||
| 		, end_val_(opacity) | 		, end_val_(opacity) | ||||||
| 	{ | 	{ | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -239,7 +239,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
|  | @ -250,7 +250,7 @@ | ||||||
|     <ClCompile> |     <ClCompile> | ||||||
|       <WarningLevel>Level3</WarningLevel> |       <WarningLevel>Level3</WarningLevel> | ||||||
|       <Optimization>Disabled</Optimization> |       <Optimization>Disabled</Optimization> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
|  | @ -264,7 +264,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
|  | @ -280,7 +280,7 @@ | ||||||
|       <FunctionLevelLinking>true</FunctionLevelLinking> |       <FunctionLevelLinking>true</FunctionLevelLinking> | ||||||
|       <IntrinsicFunctions>true</IntrinsicFunctions> |       <IntrinsicFunctions>true</IntrinsicFunctions> | ||||||
|       <BufferSecurityCheck>false</BufferSecurityCheck> |       <BufferSecurityCheck>false</BufferSecurityCheck> | ||||||
|       <TreatWarningAsError>true</TreatWarningAsError> |       <TreatWarningAsError>false</TreatWarningAsError> | ||||||
|     </ClCompile> |     </ClCompile> | ||||||
|     <Link> |     <Link> | ||||||
|       <SubSystem>Windows</SubSystem> |       <SubSystem>Windows</SubSystem> | ||||||
|  |  | ||||||
|  | @ -25,7 +25,8 @@ namespace kiwano | ||||||
| { | { | ||||||
| 	Resource::Resource(LPCWSTR file_name) | 	Resource::Resource(LPCWSTR file_name) | ||||||
| 		: type_(Type::File) | 		: type_(Type::File) | ||||||
| 		, file_name_(nullptr) | 		, bin_name_(nullptr) | ||||||
|  | 		, bin_type_(nullptr) | ||||||
| 	{ | 	{ | ||||||
| 		if (file_name) | 		if (file_name) | ||||||
| 			file_name_ = new (std::nothrow) String(file_name); | 			file_name_ = new (std::nothrow) String(file_name); | ||||||
|  | @ -33,7 +34,8 @@ namespace kiwano | ||||||
| 
 | 
 | ||||||
| 	Resource::Resource(String const& file_name) | 	Resource::Resource(String const& file_name) | ||||||
| 		: type_(Type::File) | 		: type_(Type::File) | ||||||
| 		, file_name_(nullptr) |         , bin_name_(nullptr) | ||||||
|  |         , bin_type_(nullptr) | ||||||
| 	{ | 	{ | ||||||
| 		if (!file_name.empty()) | 		if (!file_name.empty()) | ||||||
| 			file_name_ = new (std::nothrow) String(file_name); | 			file_name_ = new (std::nothrow) String(file_name); | ||||||
|  |  | ||||||
|  | @ -226,7 +226,7 @@ namespace kiwano | ||||||
| 			if (callable_) callable_->AddRef(); | 			if (callable_) callable_->AddRef(); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		Closure(Closure&& rhs) | 		Closure(Closure&& rhs) noexcept | ||||||
| 			: callable_(rhs.callable_) | 			: callable_(rhs.callable_) | ||||||
| 		{ | 		{ | ||||||
| 			rhs.callable_ = nullptr; | 			rhs.callable_ = nullptr; | ||||||
|  |  | ||||||
|  | @ -395,14 +395,6 @@ namespace kiwano | ||||||
| 			difference_type it_; | 			difference_type it_; | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
| 		template <typename _BasicJsonTy> |  | ||||||
| 		struct internal_iterator |  | ||||||
| 		{ |  | ||||||
| 			typename _BasicJsonTy::array_type::iterator array_iter; |  | ||||||
| 			typename _BasicJsonTy::object_type::iterator object_iter; |  | ||||||
| 			primitive_iterator original_iter = 0;  // for other types
 |  | ||||||
| 		}; |  | ||||||
| 
 |  | ||||||
| 		template <typename _BasicJsonTy> | 		template <typename _BasicJsonTy> | ||||||
| 		struct iterator_impl | 		struct iterator_impl | ||||||
| 		{ | 		{ | ||||||
|  | @ -422,7 +414,38 @@ namespace kiwano | ||||||
| 			using pointer			= value_type*; | 			using pointer			= value_type*; | ||||||
| 			using reference			= value_type&; | 			using reference			= value_type&; | ||||||
| 
 | 
 | ||||||
| 			inline iterator_impl(pointer json = nullptr) : data_(json) {} | 			using array_iterator	= typename _BasicJsonTy::array_type::iterator; | ||||||
|  | 			using object_iterator	= typename _BasicJsonTy::object_type::iterator; | ||||||
|  | 
 | ||||||
|  | 			inline iterator_impl(pointer json = nullptr) : data_(json), primitive_iter(0), array_iter(), object_iter() {} | ||||||
|  | 
 | ||||||
|  | 			inline iterator_impl(const iterator_impl& rhs) : iterator_impl() | ||||||
|  | 			{ | ||||||
|  | 				operator=(rhs); | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
|  | 			~iterator_impl() {} | ||||||
|  | 
 | ||||||
|  | 			inline iterator_impl& operator=(const iterator_impl& rhs) | ||||||
|  | 			{ | ||||||
|  | 				data_ = rhs.data_; | ||||||
|  | 				if (data_) | ||||||
|  | 				{ | ||||||
|  | 					switch (data_->type()) | ||||||
|  | 					{ | ||||||
|  | 					case JsonType::Object: | ||||||
|  | 						object_iter = rhs.object_iter; | ||||||
|  | 						break; | ||||||
|  | 					case JsonType::Array: | ||||||
|  | 						array_iter = rhs.array_iter; | ||||||
|  | 						break; | ||||||
|  | 					default: | ||||||
|  | 						primitive_iter = rhs.primitive_iter; | ||||||
|  | 						break; | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 				return (*this); | ||||||
|  | 			} | ||||||
| 
 | 
 | ||||||
| 			inline reference operator*() const | 			inline reference operator*() const | ||||||
| 			{ | 			{ | ||||||
|  | @ -431,9 +454,9 @@ namespace kiwano | ||||||
| 				switch (data_->type()) | 				switch (data_->type()) | ||||||
| 				{ | 				{ | ||||||
| 				case JsonType::Object: | 				case JsonType::Object: | ||||||
| 					return (it_.object_iter->second); | 					return (object_iter->second); | ||||||
| 				case JsonType::Array: | 				case JsonType::Array: | ||||||
| 					return (*it_.array_iter); | 					return (*array_iter); | ||||||
| 				default: | 				default: | ||||||
| 					return *data_; | 					return *data_; | ||||||
| 				} | 				} | ||||||
|  | @ -446,9 +469,9 @@ namespace kiwano | ||||||
| 				switch (data_->type()) | 				switch (data_->type()) | ||||||
| 				{ | 				{ | ||||||
| 				case JsonType::Object: | 				case JsonType::Object: | ||||||
| 					return &(it_.object_iter->second); | 					return &(object_iter->second); | ||||||
| 				case JsonType::Array: | 				case JsonType::Array: | ||||||
| 					return &(*it_.array_iter); | 					return &(*array_iter); | ||||||
| 				default: | 				default: | ||||||
| 					return data_; | 					return data_; | ||||||
| 				} | 				} | ||||||
|  | @ -460,7 +483,7 @@ namespace kiwano | ||||||
| 				check_iterator(); | 				check_iterator(); | ||||||
| 				if (!data_->is_object()) | 				if (!data_->is_object()) | ||||||
| 					throw json_invalid_iterator("cannot use key() with non-object type"); | 					throw json_invalid_iterator("cannot use key() with non-object type"); | ||||||
| 				return it_.object_iter->first; | 				return object_iter->first; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			inline reference value() const | 			inline reference value() const | ||||||
|  | @ -476,17 +499,17 @@ namespace kiwano | ||||||
| 				{ | 				{ | ||||||
| 					case JsonType::Object: | 					case JsonType::Object: | ||||||
| 					{ | 					{ | ||||||
| 						it_.object_iter = data_->value_.data.object->begin(); | 						object_iter = data_->value_.data.object->begin(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						it_.array_iter = data_->value_.data.vector->begin(); | 						array_iter = data_->value_.data.vector->begin(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						it_.original_iter.set_begin(); | 						primitive_iter.set_begin(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | @ -500,17 +523,17 @@ namespace kiwano | ||||||
| 				{ | 				{ | ||||||
| 					case JsonType::Object: | 					case JsonType::Object: | ||||||
| 					{ | 					{ | ||||||
| 						it_.object_iter = data_->value_.data.object->end(); | 						object_iter = data_->value_.data.object->end(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						it_.array_iter = data_->value_.data.vector->end(); | 						array_iter = data_->value_.data.vector->end(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						it_.original_iter.set_end(); | 						primitive_iter.set_end(); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | @ -525,17 +548,17 @@ namespace kiwano | ||||||
| 				{ | 				{ | ||||||
| 					case JsonType::Object: | 					case JsonType::Object: | ||||||
| 					{ | 					{ | ||||||
| 						std::advance(it_.object_iter, 1); | 						std::advance(object_iter, 1); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						std::advance(it_.array_iter, 1); | 						std::advance(array_iter, 1); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						++it_.original_iter; | 						++primitive_iter; | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | @ -551,17 +574,17 @@ namespace kiwano | ||||||
| 				{ | 				{ | ||||||
| 					case JsonType::Object: | 					case JsonType::Object: | ||||||
| 					{ | 					{ | ||||||
| 						std::advance(it_.object_iter, -1); | 						std::advance(object_iter, -1); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						std::advance(it_.array_iter, -1); | 						std::advance(array_iter, -1); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						--it_.original_iter; | 						--primitive_iter; | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | @ -584,12 +607,12 @@ namespace kiwano | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						std::advance(it_.array_iter, off); | 						std::advance(array_iter, off); | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						it_.original_iter += off; | 						primitive_iter += off; | ||||||
| 						break; | 						break; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
|  | @ -609,15 +632,15 @@ namespace kiwano | ||||||
| 				{ | 				{ | ||||||
| 					case JsonType::Object: | 					case JsonType::Object: | ||||||
| 					{ | 					{ | ||||||
| 						return it_.object_iter == other.it_.object_iter; | 						return object_iter == other.object_iter; | ||||||
| 					} | 					} | ||||||
| 					case JsonType::Array: | 					case JsonType::Array: | ||||||
| 					{ | 					{ | ||||||
| 						return it_.array_iter == other.it_.array_iter; | 						return array_iter == other.array_iter; | ||||||
| 					} | 					} | ||||||
| 					default: | 					default: | ||||||
| 					{ | 					{ | ||||||
| 						return it_.original_iter == other.it_.original_iter; | 						return primitive_iter == other.primitive_iter; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  | @ -638,9 +661,9 @@ namespace kiwano | ||||||
| 				case JsonType::Object: | 				case JsonType::Object: | ||||||
| 					throw json_invalid_iterator("cannot compare iterators with object type"); | 					throw json_invalid_iterator("cannot compare iterators with object type"); | ||||||
| 				case JsonType::Array: | 				case JsonType::Array: | ||||||
| 					return it_.array_iter < other.it_.array_iter; | 					return array_iter < other.array_iter; | ||||||
| 				default: | 				default: | ||||||
| 					return it_.original_iter < other.it_.original_iter; | 					return primitive_iter < other.primitive_iter; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  | @ -658,19 +681,19 @@ namespace kiwano | ||||||
| 				switch (data_->type()) | 				switch (data_->type()) | ||||||
| 				{ | 				{ | ||||||
| 				case JsonType::Object: | 				case JsonType::Object: | ||||||
| 					if (it_.object_iter == data_->value_.data.object->end()) | 					if (object_iter == data_->value_.data.object->end()) | ||||||
| 					{ | 					{ | ||||||
| 						throw std::out_of_range("iterator out of range"); | 						throw std::out_of_range("iterator out of range"); | ||||||
| 					} | 					} | ||||||
| 					break; | 					break; | ||||||
| 				case JsonType::Array: | 				case JsonType::Array: | ||||||
| 					if (it_.array_iter == data_->value_.data.vector->end()) | 					if (array_iter == data_->value_.data.vector->end()) | ||||||
| 					{ | 					{ | ||||||
| 						throw std::out_of_range("iterator out of range"); | 						throw std::out_of_range("iterator out of range"); | ||||||
| 					} | 					} | ||||||
| 					break; | 					break; | ||||||
| 				default: | 				default: | ||||||
| 					if (it_.original_iter == 1) | 					if (primitive_iter == 1) | ||||||
| 					{ | 					{ | ||||||
| 						throw std::out_of_range("iterator out of range"); | 						throw std::out_of_range("iterator out of range"); | ||||||
| 					} | 					} | ||||||
|  | @ -680,7 +703,24 @@ namespace kiwano | ||||||
| 
 | 
 | ||||||
| 		private: | 		private: | ||||||
| 			pointer data_; | 			pointer data_; | ||||||
| 			internal_iterator<_BasicJsonTy> it_; | 
 | ||||||
|  | 			union | ||||||
|  | 			{ | ||||||
|  | 				struct | ||||||
|  | 				{ | ||||||
|  | 					array_iterator array_iter; | ||||||
|  | 				}; | ||||||
|  | 
 | ||||||
|  | 				struct | ||||||
|  | 				{ | ||||||
|  | 					object_iterator object_iter; | ||||||
|  | 				}; | ||||||
|  | 
 | ||||||
|  | 				struct | ||||||
|  | 				{ | ||||||
|  | 					primitive_iterator primitive_iter;  // for other types
 | ||||||
|  | 				}; | ||||||
|  | 			}; | ||||||
| 		}; | 		}; | ||||||
| 	} // end of namespace __json_detail
 | 	} // end of namespace __json_detail
 | ||||||
| 
 | 
 | ||||||
|  | @ -2054,7 +2094,7 @@ namespace kiwano | ||||||
| 			if (is_object()) | 			if (is_object()) | ||||||
| 			{ | 			{ | ||||||
| 				const_iterator iter; | 				const_iterator iter; | ||||||
| 				iter.it_.object_iter = value_.data.object->find(std::forward<_Kty>(key)); | 				iter.object_iter = value_.data.object->find(std::forward<_Kty>(key)); | ||||||
| 				return iter; | 				return iter; | ||||||
| 			} | 			} | ||||||
| 			return cend(); | 			return cend(); | ||||||
|  | @ -2098,13 +2138,13 @@ namespace kiwano | ||||||
| 			{ | 			{ | ||||||
| 			case JsonType::Object: | 			case JsonType::Object: | ||||||
| 			{ | 			{ | ||||||
| 				result.it_.object_iter = value_.data.object->erase(pos.it_.object_iter); | 				result.object_iter = value_.data.object->erase(pos.object_iter); | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			case JsonType::Array: | 			case JsonType::Array: | ||||||
| 			{ | 			{ | ||||||
| 				result.it_.array_iter = value_.data.vector->erase(pos.it_.array_iter); | 				result.array_iter = value_.data.vector->erase(pos.array_iter); | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  | @ -2129,13 +2169,13 @@ namespace kiwano | ||||||
| 			{ | 			{ | ||||||
| 			case JsonType::Object: | 			case JsonType::Object: | ||||||
| 			{ | 			{ | ||||||
| 				result.it_.object_iter = value_.data.object->erase(first.it_.object_iter, last.it_.object_iter); | 				result.object_iter = value_.data.object->erase(first.object_iter, last.object_iter); | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			case JsonType::Array: | 			case JsonType::Array: | ||||||
| 			{ | 			{ | ||||||
| 				result.it_.array_iter = value_.data.vector->erase(first.it_.array_iter, last.it_.array_iter); | 				result.array_iter = value_.data.vector->erase(first.array_iter, last.array_iter); | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -226,7 +226,7 @@ namespace kiwano | ||||||
| 			if (callable_) callable_->AddRef(); | 			if (callable_) callable_->AddRef(); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		Closure(Closure&& rhs) | 		Closure(Closure&& rhs) noexcept | ||||||
| 			: callable_(rhs.callable_) | 			: callable_(rhs.callable_) | ||||||
| 		{ | 		{ | ||||||
| 			rhs.callable_ = nullptr; | 			rhs.callable_ = nullptr; | ||||||
|  |  | ||||||
|  | @ -26,6 +26,9 @@ namespace kiwano | ||||||
| 	namespace modules | 	namespace modules | ||||||
| 	{ | 	{ | ||||||
| 		Shlwapi::Shlwapi() | 		Shlwapi::Shlwapi() | ||||||
|  | 			: shlwapi(nullptr) | ||||||
|  | 			, PathFileExistsW(nullptr) | ||||||
|  | 			, SHCreateMemStream(nullptr) | ||||||
| 		{ | 		{ | ||||||
| 			shlwapi = LoadLibraryW(L"shlwapi.dll"); | 			shlwapi = LoadLibraryW(L"shlwapi.dll"); | ||||||
| 			if (shlwapi) | 			if (shlwapi) | ||||||
|  |  | ||||||
|  | @ -63,10 +63,6 @@ namespace kiwano | ||||||
| 			_In_ TextStyle const& text_style | 			_In_ TextStyle const& text_style | ||||||
| 		) const override; | 		) const override; | ||||||
| 
 | 
 | ||||||
| 		void ClearImageCache() override; |  | ||||||
| 
 |  | ||||||
| 		void DiscardResources() override; |  | ||||||
| 
 |  | ||||||
| 		HRESULT SetD2DDevice( | 		HRESULT SetD2DDevice( | ||||||
| 			_In_ ComPtr<ID2D1Device> const& device | 			_In_ ComPtr<ID2D1Device> const& device | ||||||
| 		) override; | 		) override; | ||||||
|  | @ -77,6 +73,10 @@ namespace kiwano | ||||||
| 
 | 
 | ||||||
| 		ID2D1StrokeStyle* GetStrokeStyle(StrokeStyle stroke) const override; | 		ID2D1StrokeStyle* GetStrokeStyle(StrokeStyle stroke) const override; | ||||||
| 
 | 
 | ||||||
|  |         void ClearImageCache() override; | ||||||
|  | 
 | ||||||
|  |         void DiscardResources() override; | ||||||
|  | 
 | ||||||
| 	public: | 	public: | ||||||
| 		unsigned long STDMETHODCALLTYPE AddRef(); | 		unsigned long STDMETHODCALLTYPE AddRef(); | ||||||
| 
 | 
 | ||||||
|  | @ -297,7 +297,7 @@ namespace kiwano | ||||||
| 		return hr; | 		return hr; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	HRESULT D2DDeviceResources::SetD2DDevice(ComPtr<ID2D1Device> const& device) | 	HRESULT D2DDeviceResources::SetD2DDevice(_In_ ComPtr<ID2D1Device> const& device) | ||||||
| 	{ | 	{ | ||||||
| 		ComPtr<ID2D1DeviceContext> d2d_device_ctx; | 		ComPtr<ID2D1DeviceContext> d2d_device_ctx; | ||||||
| 
 | 
 | ||||||
|  | @ -316,14 +316,14 @@ namespace kiwano | ||||||
| 		return hr; | 		return hr; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	void D2DDeviceResources::SetTargetBitmap(ComPtr<ID2D1Bitmap1> const& target) | 	void D2DDeviceResources::SetTargetBitmap(_In_ ComPtr<ID2D1Bitmap1> const& target) | ||||||
| 	{ | 	{ | ||||||
| 		target_bitmap_ = target; | 		target_bitmap_ = target; | ||||||
| 		if (device_context_) | 		if (device_context_) | ||||||
| 			device_context_->SetTarget(target_bitmap_.Get()); | 			device_context_->SetTarget(target_bitmap_.Get()); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	HRESULT D2DDeviceResources::CreateBitmapFromFile(ComPtr<ID2D1Bitmap> & bitmap, String const & file_path) | 	HRESULT D2DDeviceResources::CreateBitmapFromFile(_Out_ ComPtr<ID2D1Bitmap> & bitmap, _In_ String const & file_path) | ||||||
| 	{ | 	{ | ||||||
| 		if (!imaging_factory_ || !device_context_) | 		if (!imaging_factory_ || !device_context_) | ||||||
| 			return E_UNEXPECTED; | 			return E_UNEXPECTED; | ||||||
|  | @ -390,7 +390,7 @@ namespace kiwano | ||||||
| 		return hr; | 		return hr; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	HRESULT D2DDeviceResources::CreateBitmapFromResource(ComPtr<ID2D1Bitmap> & bitmap, Resource const & res) | 	HRESULT D2DDeviceResources::CreateBitmapFromResource(_Out_ ComPtr<ID2D1Bitmap> & bitmap, _In_ Resource const & res) | ||||||
| 	{ | 	{ | ||||||
| 		if (!imaging_factory_ || !device_context_) | 		if (!imaging_factory_ || !device_context_) | ||||||
| 			return E_UNEXPECTED; | 			return E_UNEXPECTED; | ||||||
|  | @ -477,7 +477,8 @@ namespace kiwano | ||||||
| 		return hr; | 		return hr; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	HRESULT D2DDeviceResources::CreateTextFormat(ComPtr<IDWriteTextFormat> & text_format, Font const & font, TextStyle const & text_style) const | 	HRESULT D2DDeviceResources::CreateTextFormat(_Out_ ComPtr<IDWriteTextFormat> & text_format, | ||||||
|  |         _In_ Font const & font, _In_ TextStyle const & text_style) const | ||||||
| 	{ | 	{ | ||||||
| 		if (!dwrite_factory_) | 		if (!dwrite_factory_) | ||||||
| 			return E_UNEXPECTED; | 			return E_UNEXPECTED; | ||||||
|  | @ -515,7 +516,9 @@ namespace kiwano | ||||||
| 		return hr; | 		return hr; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	HRESULT D2DDeviceResources::CreateTextLayout(ComPtr<IDWriteTextLayout> & text_layout, Size& layout_size, String const & text, ComPtr<IDWriteTextFormat> const& text_format, TextStyle const & text_style) const | 	HRESULT D2DDeviceResources::CreateTextLayout(_Out_ ComPtr<IDWriteTextLayout> & text_layout, | ||||||
|  |         _Out_ Size& layout_size, _In_ String const & text, _In_ ComPtr<IDWriteTextFormat> const& text_format, | ||||||
|  |         _In_ TextStyle const & text_style) const | ||||||
| 	{ | 	{ | ||||||
| 		if (!dwrite_factory_) | 		if (!dwrite_factory_) | ||||||
| 			return E_UNEXPECTED; | 			return E_UNEXPECTED; | ||||||
|  |  | ||||||
|  | @ -20,8 +20,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "D3D10DeviceResources.h" | #include "D3D10DeviceResources.h" | ||||||
| 
 | 
 | ||||||
| #if defined(KGE_USE_DIRECTX10) |  | ||||||
| 
 |  | ||||||
| #include "../2d/Image.h" | #include "../2d/Image.h" | ||||||
| #include "../base/logs.h" | #include "../base/logs.h" | ||||||
| 
 | 
 | ||||||
|  | @ -541,5 +539,3 @@ namespace kiwano | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #endif // !KGE_USE_DIRECTX10
 |  | ||||||
|  |  | ||||||
|  | @ -22,8 +22,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "../macros.h" | #include "../macros.h" | ||||||
| 
 | 
 | ||||||
| #if defined(KGE_USE_DIRECTX10) |  | ||||||
| 
 |  | ||||||
| #include "D2DDeviceResources.h" | #include "D2DDeviceResources.h" | ||||||
| #include "D3DDeviceResourcesBase.h" | #include "D3DDeviceResourcesBase.h" | ||||||
| #include <d3d10_1.h> | #include <d3d10_1.h> | ||||||
|  | @ -52,5 +50,3 @@ namespace kiwano | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #endif // !KGE_USE_DIRECTX10
 |  | ||||||
|  |  | ||||||
|  | @ -20,8 +20,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "D3D11DeviceResources.h" | #include "D3D11DeviceResources.h" | ||||||
| 
 | 
 | ||||||
| #if !defined(KGE_USE_DIRECTX10) |  | ||||||
| 
 |  | ||||||
| #include "../2d/Image.h" | #include "../2d/Image.h" | ||||||
| #include "../base/logs.h" | #include "../base/logs.h" | ||||||
| 
 | 
 | ||||||
|  | @ -546,5 +544,3 @@ namespace kiwano | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 |  | ||||||
| #endif // !KGE_USE_DIRECTX10
 |  | ||||||
|  |  | ||||||
|  | @ -22,8 +22,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "../macros.h" | #include "../macros.h" | ||||||
| 
 | 
 | ||||||
| #if !defined(KGE_USE_DIRECTX10) |  | ||||||
| 
 |  | ||||||
| #include "D2DDeviceResources.h" | #include "D2DDeviceResources.h" | ||||||
| #include "D3DDeviceResourcesBase.h" | #include "D3DDeviceResourcesBase.h" | ||||||
| #include <d3d11.h> | #include <d3d11.h> | ||||||
|  | @ -55,4 +53,3 @@ namespace kiwano | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #endif // !KGE_USE_DIRECTX10
 |  | ||||||
|  |  | ||||||
|  | @ -35,12 +35,12 @@ namespace kiwano | ||||||
| 		STDMETHOD(CreateDeviceResources)(); | 		STDMETHOD(CreateDeviceResources)(); | ||||||
| 
 | 
 | ||||||
| 		STDMETHOD_(void, SetTextStyle)( | 		STDMETHOD_(void, SetTextStyle)( | ||||||
| 			FLOAT opacity, |             _In_ FLOAT opacity, | ||||||
| 			CONST D2D1_COLOR_F &fillColor, |             _In_ CONST D2D1_COLOR_F &fillColor, | ||||||
| 			BOOL outline, |             _In_ BOOL outline, | ||||||
| 			CONST D2D1_COLOR_F &outlineColor, |             _In_ CONST D2D1_COLOR_F &outlineColor, | ||||||
| 			FLOAT outlineWidth, |             _In_ FLOAT outlineWidth, | ||||||
| 			ID2D1StrokeStyle* outlineJoin |             _In_ ID2D1StrokeStyle* outlineJoin | ||||||
| 			); | 			); | ||||||
| 
 | 
 | ||||||
| 		STDMETHOD(DrawGlyphRun)( | 		STDMETHOD(DrawGlyphRun)( | ||||||
|  | @ -115,8 +115,8 @@ namespace kiwano | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	HRESULT ITextRenderer::Create( | 	HRESULT ITextRenderer::Create( | ||||||
| 		ITextRenderer** ppTextRenderer, |         _Out_ ITextRenderer** ppTextRenderer, | ||||||
| 		ID2D1RenderTarget* pRT) | 		_In_ ID2D1RenderTarget* pRT) | ||||||
| 	{ | 	{ | ||||||
| 		HRESULT hr = E_FAIL; | 		HRESULT hr = E_FAIL; | ||||||
| 
 | 
 | ||||||
|  | @ -188,12 +188,12 @@ namespace kiwano | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	STDMETHODIMP_(void) TextRenderer::SetTextStyle( | 	STDMETHODIMP_(void) TextRenderer::SetTextStyle( | ||||||
| 		FLOAT opacity, |         _In_ FLOAT opacity, | ||||||
| 		CONST D2D1_COLOR_F &fillColor, |         _In_ CONST D2D1_COLOR_F &fillColor, | ||||||
| 		BOOL outline, |         _In_ BOOL outline, | ||||||
| 		CONST D2D1_COLOR_F &outlineColor, |         _In_ CONST D2D1_COLOR_F &outlineColor, | ||||||
| 		FLOAT outlineWidth, |         _In_ FLOAT outlineWidth, | ||||||
| 		ID2D1StrokeStyle* outlineJoin) |         _In_ ID2D1StrokeStyle* outlineJoin) | ||||||
| 	{ | 	{ | ||||||
| 		sFillColor_ = fillColor; | 		sFillColor_ = fillColor; | ||||||
| 		bShowOutline_ = outline; | 		bShowOutline_ = outline; | ||||||
|  |  | ||||||
|  | @ -34,11 +34,11 @@ namespace kiwano | ||||||
| 		); | 		); | ||||||
| 
 | 
 | ||||||
| 		STDMETHOD_(void, SetTextStyle)( | 		STDMETHOD_(void, SetTextStyle)( | ||||||
| 			FLOAT opacity, | 			_In_ FLOAT opacity, | ||||||
| 			CONST D2D1_COLOR_F &fillColor, |             _In_ CONST D2D1_COLOR_F &fillColor, | ||||||
| 			BOOL outline, |             _In_ BOOL outline, | ||||||
| 			CONST D2D1_COLOR_F &outlineColor, |             _In_ CONST D2D1_COLOR_F &outlineColor, | ||||||
| 			FLOAT outlineWidth, |             _In_ FLOAT outlineWidth, | ||||||
| 			_In_ ID2D1StrokeStyle* outlineJoin | 			_In_ ID2D1StrokeStyle* outlineJoin | ||||||
| 		) PURE; | 		) PURE; | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
|  | @ -626,7 +626,7 @@ private: | ||||||
|           LPVOID vData = malloc(dwSize); |           LPVOID vData = malloc(dwSize); | ||||||
|           if (vData != NULL) |           if (vData != NULL) | ||||||
|           { |           { | ||||||
|             if (GetFileVersionInfoA(szImg, dwHandle, dwSize, vData) != 0) |             if (GetFileVersionInfoA(szImg, NULL /* dwHandle reserved */, dwSize, vData) != 0) | ||||||
|             { |             { | ||||||
|               UINT len; |               UINT len; | ||||||
|               TCHAR szSubBlock[] = _T("\\"); |               TCHAR szSubBlock[] = _T("\\"); | ||||||
|  |  | ||||||
|  | @ -2419,7 +2419,8 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) : | ||||||
|     _textDepth( -1 ), |     _textDepth( -1 ), | ||||||
|     _processEntities( true ), |     _processEntities( true ), | ||||||
|     _compactMode( compact ), |     _compactMode( compact ), | ||||||
|     _buffer() |     _buffer(), | ||||||
|  |     _entityFlag{} | ||||||
| { | { | ||||||
|     for( int i=0; i<ENTITY_RANGE; ++i ) { |     for( int i=0; i<ENTITY_RANGE; ++i ) { | ||||||
|         _entityFlag[i] = false; |         _entityFlag[i] = false; | ||||||
|  |  | ||||||
|  | @ -212,6 +212,7 @@ class DynArray | ||||||
| { | { | ||||||
| public: | public: | ||||||
|     DynArray() : |     DynArray() : | ||||||
|  |         _pool{}, | ||||||
|         _mem( _pool ), |         _mem( _pool ), | ||||||
|         _allocated( INITIAL_SIZE ), |         _allocated( INITIAL_SIZE ), | ||||||
|         _size( 0 ) |         _size( 0 ) | ||||||
|  |  | ||||||
|  | @ -53,7 +53,7 @@ namespace kiwano | ||||||
| 					if (rows || cols) | 					if (rows || cols) | ||||||
| 					{ | 					{ | ||||||
| 						// Image slices
 | 						// Image slices
 | ||||||
| 						return loader->AddFrames(*id, Resource(gdata->path + (*file)), std::max(cols, 1), std::max(rows, 1)); | 						return !!loader->AddFrames(*id, Resource(gdata->path + (*file)), std::max(cols, 1), std::max(rows, 1)); | ||||||
| 					} | 					} | ||||||
| 					else | 					else | ||||||
| 					{ | 					{ | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| #include "MainScene.h" | #include "MainScene.h" | ||||||
| 
 | 
 | ||||||
| int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) | int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR, _In_ int) | ||||||
| { | { | ||||||
| 	try | 	try | ||||||
| 	{ | 	{ | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ public: | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) | int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR, _In_ int) | ||||||
| { | { | ||||||
| 	// 创建 Kiwano 程序实例
 | 	// 创建 Kiwano 程序实例
 | ||||||
| 	Application app; | 	Application app; | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ public: | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) | int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR, _In_ int) | ||||||
| { | { | ||||||
| 	try | 	try | ||||||
| 	{ | 	{ | ||||||
|  |  | ||||||
|  | @ -99,7 +99,7 @@ public: | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) | int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ PWSTR, _In_ int) | ||||||
| { | { | ||||||
| 	try | 	try | ||||||
| 	{ | 	{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue