Ticket #13 (closed bug: fixed)

Opened 7 years ago

Last modified 4 years ago

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:
Platform Version: Platform: All
Must Fix for Release: No 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

Changed 7 years ago by mloskot

  • type changed from defect to bug

Changed 7 years ago by gsherman

  • status changed from new to assigned

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

Changed 7 years ago by mloskot

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

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

Changed 7 years ago by g_j_m

  • status changed from assigned to closed
  • resolution set to fixed

Resolved in r5060

Changed 6 years ago by anonymous

  • status_info unset
  • must_fix set to No

Changed 4 years ago by anonymous

  • milestone Version 0.8 deleted

Milestone Version 0.8 deleted

Note: See TracTickets for help on using tickets.