Hi,
On 03/07/15 12:13, YongHao Hu wrote:
+/* ??$?5MDU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$complex@M@0@@Z */ +/* ??$?5MDU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$complex@M@0@@Z */ +basic_istream_char* __cdecl basic_istream_char_read_complex_float(basic_istream_char *this, complex_float *v) +{
- float r;
- basic_ios_char *base = basic_istream_char_get_basic_ios(this);
- if(ios_base_good(&base->base)) {
There's no need to check the stream state here, it will be done by stream reading functions.
ws_basic_istream_char(this);
if(basic_istream_char_peek(this) == '(') {
basic_istream_char_get(this);
basic_istream_char_read_float(this, &r);
if(!ios_base_fail(&base->base)) {
I think that the implementation will be more readable if you just return on error here. The if(!ios_base_fail(...)) line can be changed to: if(ios_base_fail(&base->base)) return this; You don't need to set failbit in this case because it's already set by basic_istream_char_read_float. The same applies to some other ios_base_fail() checks.
Thanks, Piotr