+static inline LPWSTR strdupW( LPCWSTR src ) +{ + LPWSTR dest; + if (!src) return NULL; + dest = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(src)+1)*sizeof(WCHAR) ); + if (dest) + lstrcpyW(dest, src); + return dest; +}
I submitted a similar patch months ago and was told that I had to change LPWSTR to WCHAR * and consistently indent or not indent after these two if statements.
-Alex
2017-02-07 2:30 GMT+01:00 Alex Henrie alexhenrie24@gmail.com:
+static inline LPWSTR strdupW( LPCWSTR src ) +{
- LPWSTR dest;
- if (!src) return NULL;
- dest = HeapAlloc( GetProcessHeap(), 0, (lstrlenW(src)+1)*sizeof(WCHAR) );
- if (dest)
lstrcpyW(dest, src);
- return dest;
+}
I submitted a similar patch months ago and was told that I had to change LPWSTR to WCHAR * and consistently indent or not indent after these two if statements.
-Alex
Those look like valid points to me too (or, equivalently, "but this piece of code was already there, I just moved it" has never been a good excuse :P) Also whitespaces inside the parentheses and around operators should be fixed.