@@ -122,26 +122,26 @@ namespace shader
122122#endif
123123 }
124124
125- result::Expected <std::optional<CompiledShader>, std::string> CompileShader (const std::string& shaderFile,
126- const std::string& entryPoint,
127- const std::string& target,
128- const bool debug,
129- ISearchPath& searchPath,
130- MemoryManager& memory)
125+ std::expected <std::optional<CompiledShader>, std::string> CompileShader (const std::string& shaderFile,
126+ const std::string& entryPoint,
127+ const std::string& target,
128+ const bool debug,
129+ ISearchPath& searchPath,
130+ MemoryManager& memory)
131131 {
132132#ifdef _WIN32
133133 if (!initialized)
134134 InitializeShaderCompilation ();
135135 if (!compilationAvailable)
136- return result::Unexpected< std::string> (" Shader compilation unavailable" );
136+ return std::unexpected (" Shader compilation unavailable" );
137137
138138 const auto fileName = GetSourceFileNameForShaderAssetName (shaderFile);
139139 auto file = searchPath.Open (fileName);
140140 if (!file.IsOpen () || file.m_length <= 0 )
141141 return std::optional<CompiledShader>(std::nullopt );
142142
143143 if (std::cmp_greater (file.m_length , MAX_SHADER_SIZE ))
144- return result::Unexpected (std::format (" File too big: {}" , file.m_length ));
144+ return std::unexpected (std::format (" File too big: {}" , file.m_length ));
145145
146146 const auto shaderSize = file.m_length ;
147147 const auto shaderData = std::make_unique<char []>(static_cast <size_t >(shaderSize));
@@ -185,7 +185,7 @@ namespace shader
185185 if (shaderBlob)
186186 shaderBlob->Release ();
187187
188- return result::Unexpected (std::move (errorMessage));
188+ return std::unexpected (std::move (errorMessage));
189189 }
190190
191191 const auto shaderBlobSize = static_cast <size_t >(shaderBlob->GetBufferSize ());
0 commit comments