Re: [PATCH 1/2] riched20: Stub for ITextFont interface and implement ITextRange::GetFont. (try 2)
On Thu, Sep 18, 2014 at 09:15:11PM +0800, Jactry Zeng wrote:
+static IRichEditOleImpl *get_reOle(ITextFontImpl *txtFont) +{ + if (txtFont->txtRge) + return txtFont->txtRge->reOle; + else + return txtFont->txtSel->reOle; +}
You're using two-space indents here, while the rest is four-space. A couple of these have sneaked in in earlier patches too - make sure your editor is set up correctly!
+static HRESULT CreateITextFont(ITextFontImpl **ptxtFont) +{ + ITextFontImpl *txtFont = NULL;
This initialization isn't very useful.
+ txtFont = heap_alloc(sizeof(ITextFontImpl)); + if (!txtFont) + return E_OUTOFMEMORY; + + txtFont->ITextFont_iface.lpVtbl = &tfvt; + txtFont->ref = 1; + *ptxtFont = txtFont; + return S_OK; +}
It would make more sense to initialize txtSel and txtRge to NULL here - the caller then only needs to touch the one it needs. Otherwise, this one and the next one look good to me. Huw.
2014-09-19 19:34 GMT+08:00 Huw Davies <huw(a)codeweavers.com>:
On Thu, Sep 18, 2014 at 09:15:11PM +0800, Jactry Zeng wrote:
+static IRichEditOleImpl *get_reOle(ITextFontImpl *txtFont) +{ + if (txtFont->txtRge) + return txtFont->txtRge->reOle; + else + return txtFont->txtSel->reOle; +}
You're using two-space indents here, while the rest is four-space. A couple of these have sneaked in in earlier patches too - make sure your editor is set up correctly!
So sorry, because sometime two-space indent was needed in other files and my editor using two-space default. I will be more carefully next time! Thanks for your review. -- Regards, Jactry Zeng
participants (2)
-
Huw Davies -
Jactry Zeng