Fixing Auto3 on POSIX broke it on Win32, wonderful world of compiler incompatibilities.

Originally committed to SVN as r1169.
This commit is contained in:
Niels Martin Hansen 2007-05-08 00:05:59 +00:00
parent 8f3cffcd01
commit b22a47f842

View file

@ -673,7 +673,13 @@ namespace Automation4 {
cb.ms_from_frame = MsFromFrame;
char *errormsg = 0;
// Why oh why... GCC wants fn_str() to be dereffed with .data() but MSVC hates that...
// If anyone can FIXME to something more sensible, please do so
#ifdef WIN32
script = CreateAuto3Script((const filename_t)GetFilename().fn_str(), GetPrettyFilename().mb_str(wxConvUTF8), &cb, &errormsg);
#else
script = CreateAuto3Script((const filename_t)GetFilename().fn_str().data(), GetPrettyFilename().mb_str(wxConvUTF8).data(), &cb, &errormsg);
#endif
if (script) {
assert(errormsg == 0);