Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#13 closed bug (fixed)

QgsUniqueValueRenderer::operator= must return a value

Reported by: mloskot Owned by: gsherman
Priority: major: does not work as expected Milestone:
Component: Vectors Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

Assignment operator must return a value. Trying to compile this code using VC++ or Comeau C/C++:

struct A
{
   A& operator=(A const& rhs)
   {
   }
};

I get this error:

MODE:strict errors C++

"ComeauTest.c", line 5: warning: missing return statement
at end of non-void function
"A::operator="
}
^

This is ISO C++ conformant behaviour.

There are many assignment operators defined as not returning any value. This is a bug!

Change History (6)

comment:1 by mloskot, 18 years ago

Type: defectbug

comment:2 by gsherman, 18 years ago

Status: newassigned

As far as I can tell, it does return a value.

comment:3 by mloskot, 18 years ago

Yes, as I see in the logs, timlinux applied those changes:

https://svn.qgis.org/trac/changeset/5060

comment:4 by g_j_m, 18 years ago

Resolution: fixed
Status: assignedclosed

Resolved in r5060

comment:5 by anonymous, 17 years ago

Awaiting user input: unset
Must Fix for Release: No

comment:6 by (none), 15 years ago

Milestone: Version 0.8

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.