From: SourceForge.net <no...@so...> - 2003-08-28 12:35:22
|
Patches item #796645, was opened at 2003-08-28 12:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307869&aid=796645&group_id=7869 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jonathan Wakely (redi) Assigned to: Nobody/Anonymous (nobody) Summary: Init base class in Fields' copy ctor Initial Comment: This patch prevents the following warning from GCC 3.4 when compiled with "-Wall -W": Fields.cc: In copy constructor `mysqlcppapi::Fields::Fields(const mysqlcppapi::Fields&)': Fields.cc:33: warning: base class `class std::vector<mysqlcppapi::FieldInfo, std::allocator<mysqlcppapi::FieldInfo> >' should be explicitly initialized in the copy constructor Without this patch the base class is default-initialised and then assigned to, and GCC warns because the base is not copy constructed. This patch explicitly copy constructs the base class and removes the call to the assignment operator. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307869&aid=796645&group_id=7869 |