[svn-r8269] Purpose:

Cleaning up warnings

Description:
    Many exception constructors have warnings about reference to temporary
    location because of the parameter initialization, for example,
    "const string& var = 0."

Solution:
    Changed "string&" parameters to pass by value for these constructors.
    Consequently, passing string by value also takes care of char pointers
    so the overloaded constructors for char pointers are then removed.
    Also, instead of setting Exception::detailMessage to null string, I
    set it to DEFAULT_MSG ("No detailed information provided") by default.

Platforms:
    SunOS 5.7 (arabica)
    Linux 2.4 (eirene)
    IA-64 (titan)
This commit is contained in:
Binh-Minh Ribler
2004-03-21 21:56:59 -05:00
parent 7fb0362eed
commit 9e3178fedf
7 changed files with 34 additions and 70 deletions

View File

@@ -185,7 +185,7 @@ void H5File::p_close() const
// exception can be thrown for file or group. The func_name is a member
// function of CommonFG and "H5File::" will be inserted to indicate the
// function called is an implementation of H5File
void H5File::throwException(const string& func_name, const string& msg) const
void H5File::throwException(const string func_name, const string msg) const
{
string full_name = func_name;
full_name.insert(0, "H5File::");