Huw Davies (@huw) commented about dlls/riched20/style.c:
heap_free(s); }
-void ME_AddRefStyle(ME_Style *s) +ME_Style *style_add_ref( ME_Style *s ) { assert(s->nRefs>0); /* style with 0 references isn't supposed to exist */ s->nRefs++; all_refs++;
- TRACE_(richedit_style)("ME_AddRefStyle %p, new refs=%d, total refs=%d\n", s, s->nRefs, all_refs);
- TRACE_(richedit_style)( "style %p, new refs %d, total refs %d.\n", s, s->nRefs, all_refs );
- return s;
}
I'm not convinced that this is an improvement. Whilst it does allow an assignment and the reference to be written on a single line, it's not very conventional and I found myself checking that the returned ptr was the same as the passed in ptr.