On 10/22/12 10:13 PM, Rico Schüller wrote:
On 22.10.2012 21:27, Christian Costa wrote:
+static HRESULT WINAPI ID3DXFileImpl_QueryInterface(ID3DXFile *iface,
REFIID riid, LPVOID *ret_iface)
- ID3DXFileImpl *This = impl_from_ID3DXFile(iface);
- ID3DXFileImpl* object;
Please be a bit more consistent across your patch... There are a lot
more occurrences where you mix both usages.
His usage seems natural when you think about using 'This' as analogy to 'this' in C++ implementation. That said, it's really a matter of taste, but such analogy feels natural when you work with COM. And by that logic, the patch is consistent. It uses 'object' as name of global function, which is not member of any class-like thing.
Christian, there were some informal attempts to limit usage of stuff like LPVOID (and really any LP* types). It would be nice if you could avoid it in your patches.
Jacek
On 22.10.2012 22:55, Jacek Caban wrote:
On 10/22/12 10:13 PM, Rico Schüller wrote:
On 22.10.2012 21:27, Christian Costa wrote:
+static HRESULT WINAPI ID3DXFileImpl_QueryInterface(ID3DXFile *iface,
REFIID riid, LPVOID *ret_iface)
- ID3DXFileImpl *This = impl_from_ID3DXFile(iface);
- ID3DXFileImpl* object;
Please be a bit more consistent across your patch... There are a lot
more occurrences where you mix both usages.
His usage seems natural when you think about using 'This' as analogy to 'this' in C++ implementation. That said, it's really a matter of taste, but such analogy feels natural when you work with COM. And by that logic, the patch is consistent. It uses 'object' as name of global function, which is not member of any class-like thing.
I meant: ID3DXFileImpl* object; vs ID3DXFileImpl *object;
Cheers Rico
Le 22/10/2012 22:55, Jacek Caban a écrit :
On 10/22/12 10:13 PM, Rico Schüller wrote:
On 22.10.2012 21:27, Christian Costa wrote:
+static HRESULT WINAPI ID3DXFileImpl_QueryInterface(ID3DXFile *iface,
REFIID riid, LPVOID *ret_iface)
- ID3DXFileImpl *This = impl_from_ID3DXFile(iface);
- ID3DXFileImpl* object;
Please be a bit more consistent across your patch... There are a lot
more occurrences where you mix both usages.
His usage seems natural when you think about using 'This' as analogy to 'this' in C++ implementation. That said, it's really a matter of taste, but such analogy feels natural when you work with COM. And by that logic, the patch is consistent. It uses 'object' as name of global function, which is not member of any class-like thing.
Christian, there were some informal attempts to limit usage of stuff like LPVOID (and really any LP* types). It would be nice if you could avoid it in your patches.
Jacek
I don't mind change it but just by curiosity what's the reason? MSDN uses it a lot.
By the way is there a page on the wiki that deals with coding style/rules with mandatory & preferred stuff? If not I can create one and put what I'm aware of.
On 22 October 2012 23:19, Christian Costa titan.costa@gmail.com wrote:
Le 22/10/2012 22:55, Jacek Caban a écrit :
Christian, there were some informal attempts to limit usage of stuff like LPVOID (and really any LP* types). It would be nice if you could avoid it in your patches.
Jacek
I don't mind change it but just by curiosity what's the reason? MSDN uses it a lot.
The main consideration is that "const LPVOID" etc. doesn't do what you want it to do, though I'd also argue that in most cases typedefs in general only obscure the actual type of variables.