@@ -90,9 +90,10 @@ bool Main(const fml::CommandLine& command_line) {
90
90
91
91
auto spriv_file_name = std::filesystem::absolute (
92
92
std::filesystem::current_path () / switches.spirv_file_name );
93
- if (!fml::WriteAtomically (*switches.working_directory ,
94
- spriv_file_name.u8string ().c_str (),
95
- *compiler.GetSPIRVAssembly ())) {
93
+ if (!fml::WriteAtomically (
94
+ *switches.working_directory ,
95
+ reinterpret_cast <const char *>(spriv_file_name.u8string ().c_str ()),
96
+ *compiler.GetSPIRVAssembly ())) {
96
97
std::cerr << " Could not write file to " << switches.spirv_file_name
97
98
<< std::endl;
98
99
return false ;
@@ -118,9 +119,10 @@ bool Main(const fml::CommandLine& command_line) {
118
119
std::cerr << " Runtime stage data could not be created." << std::endl;
119
120
return false ;
120
121
}
121
- if (!fml::WriteAtomically (*switches.working_directory , //
122
- sl_file_name.u8string ().c_str (), //
123
- *stage_data_mapping //
122
+ if (!fml::WriteAtomically (*switches.working_directory , //
123
+ reinterpret_cast <const char *>(
124
+ sl_file_name.u8string ().c_str ()), //
125
+ *stage_data_mapping //
124
126
)) {
125
127
std::cerr << " Could not write file to " << switches.sl_file_name
126
128
<< std::endl;
@@ -132,9 +134,10 @@ bool Main(const fml::CommandLine& command_line) {
132
134
return false ;
133
135
}
134
136
} else {
135
- if (!fml::WriteAtomically (*switches.working_directory ,
136
- sl_file_name.u8string ().c_str (),
137
- *compiler.GetSLShaderSource ())) {
137
+ if (!fml::WriteAtomically (
138
+ *switches.working_directory ,
139
+ reinterpret_cast <const char *>(sl_file_name.u8string ().c_str ()),
140
+ *compiler.GetSLShaderSource ())) {
138
141
std::cerr << " Could not write file to " << switches.sl_file_name
139
142
<< std::endl;
140
143
return false ;
@@ -148,7 +151,8 @@ bool Main(const fml::CommandLine& command_line) {
148
151
std::filesystem::current_path () / switches.reflection_json_name );
149
152
if (!fml::WriteAtomically (
150
153
*switches.working_directory ,
151
- reflection_json_name.u8string ().c_str (),
154
+ reinterpret_cast <const char *>(
155
+ reflection_json_name.u8string ().c_str ()),
152
156
*compiler.GetReflector ()->GetReflectionJSON ())) {
153
157
std::cerr << " Could not write reflection json to "
154
158
<< switches.reflection_json_name << std::endl;
@@ -162,7 +166,8 @@ bool Main(const fml::CommandLine& command_line) {
162
166
switches.reflection_header_name .c_str ());
163
167
if (!fml::WriteAtomically (
164
168
*switches.working_directory ,
165
- reflection_header_name.u8string ().c_str (),
169
+ reinterpret_cast <const char *>(
170
+ reflection_header_name.u8string ().c_str ()),
166
171
*compiler.GetReflector ()->GetReflectionHeader ())) {
167
172
std::cerr << " Could not write reflection header to "
168
173
<< switches.reflection_header_name << std::endl;
@@ -175,7 +180,8 @@ bool Main(const fml::CommandLine& command_line) {
175
180
std::filesystem::absolute (std::filesystem::current_path () /
176
181
switches.reflection_cc_name .c_str ());
177
182
if (!fml::WriteAtomically (*switches.working_directory ,
178
- reflection_cc_name.u8string ().c_str (),
183
+ reinterpret_cast <const char *>(
184
+ reflection_cc_name.u8string ().c_str ()),
179
185
*compiler.GetReflector ()->GetReflectionCC ())) {
180
186
std::cerr << " Could not write reflection CC to "
181
187
<< switches.reflection_cc_name << std::endl;
@@ -204,9 +210,10 @@ bool Main(const fml::CommandLine& command_line) {
204
210
}
205
211
auto depfile_path = std::filesystem::absolute (
206
212
std::filesystem::current_path () / switches.depfile_path .c_str ());
207
- if (!fml::WriteAtomically (*switches.working_directory ,
208
- depfile_path.u8string ().c_str (),
209
- *compiler.CreateDepfileContents ({result_file}))) {
213
+ if (!fml::WriteAtomically (
214
+ *switches.working_directory ,
215
+ reinterpret_cast <const char *>(depfile_path.u8string ().c_str ()),
216
+ *compiler.CreateDepfileContents ({result_file}))) {
210
217
std::cerr << " Could not write depfile to " << switches.depfile_path
211
218
<< std::endl;
212
219
return false ;
0 commit comments