Repository navigation
Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
Sigh. I guess I need to use my real email with github to make googlebot happy. |
|
❌ Build DirectXShaderCompiler 1.0.19 failed (commit e72baee604 by @) |
|
This is failing because I have used e.g. ../lib/DxcSupport/dxcapi.use.cpp:121:45: error: no member named 'c_str' in 'CW2AEX<128>'
std::ofstream outputFile (CW2A(pFileName).c_str(), std::ios::out | std::ios::binary); |
|
I guess these can be replaced with |
|
That or just the variable. It has a conversion operator. I'll address this on my end. I still need to get this branch building locally and I guess I can't fake it. |
|
I've exposed my gmail email through github. I don't know what else I can do to satisfy the CLA check. It tells me I'm valid, but one of the authors isn't, but I'm the only author. |
Add a non-windows implementation of CW2AEX and CA2WEX using std:: character conversion functions to WinTypes.h header. Includes CW2A and CW2A macros the same way Windows does fix google#172
|
❌ Build DirectXShaderCompiler 1.0.23 failed (commit 9a25bb323c by @) |
|
Abandoning in hopes that a brand new pull request will allow the CLA to pass. |
| CW2AEX( LPCWSTR psz , UINT nCodePage = CP_UTF8) | ||
| { | ||
| if (nCodePage != CP_UTF8) { | ||
| // you have reached the limits of this half-assed implementation. So sorry. |
There was a problem hiding this comment.
The style guide requires proper punctual comments.
Although a pain at first, I have found this to be nice in the long run.
Can change to:
// Current implementation only supports UTF8.There was a problem hiding this comment.
hah! sorry. I forgot about that comment. It's the kind of snark I'd include in reviews but not source code.
| if (nCodePage != CP_UTF8) { | ||
| // you have reached the limits of this half-assed implementation. So sorry. | ||
| m_psz = NULL; | ||
| return; |
There was a problem hiding this comment.
If it does not cause crashes/errors in the basic use-case (running dxc on an hlsl file), then we should die here, so that we know when some bad usage occurs, rather than silently chasing a nullptr.
assert(false && "CW2AEX implementation for Linux does not handle non-UTF8 code pages");
return;| operator LPSTR() const { return m_psz; } | ||
|
|
||
| char *m_psz; | ||
| char m_szBuffer[t_nBufferLength]; // dunno what this is for |
There was a problem hiding this comment.
The only reason for including that is it's part of the published interface of CW2AEX. Plus, if I remember my template edge cases correctly, compilers get cross if you don't use the template variable anywhere and if it's no longer a template, then it can't be used like CW2AEX<> as it is in various places. I will certainly remove the comment and maybe explain this in a comment instead.
I will test the unused template variable though.
| CA2WEX( LPCSTR psz, UINT nCodePage = CP_UTF8 ) | ||
| { | ||
| if (nCodePage != CP_UTF8) { | ||
| // you have reached the limits of this half-assed implementation. So sorry. |
| if (nCodePage != CP_UTF8) { | ||
| // you have reached the limits of this half-assed implementation. So sorry. | ||
| m_psz = NULL; | ||
| return; |
Add a non-windows implementation of CW2AEX and CA2WEX using std::
character conversion functions to WinTypes.h header. Includes
CW2A and CW2A macros the same way Windows does
fix #172