summaryrefslogtreecommitdiffstats
path: root/c++/src/H5File.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2004-03-22 02:56:59 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2004-03-22 02:56:59 (GMT)
commit9e3178fedfab5caa9eed7395ac2d2a9b9a8a7130 (patch)
tree8003f306aaef942d32adc30235aa818772a052dd /c++/src/H5File.cpp
parent7fb0362eeda413222426613058a51282d25d0235 (diff)
downloadhdf5-9e3178fedfab5caa9eed7395ac2d2a9b9a8a7130.zip
hdf5-9e3178fedfab5caa9eed7395ac2d2a9b9a8a7130.tar.gz
hdf5-9e3178fedfab5caa9eed7395ac2d2a9b9a8a7130.tar.bz2
[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)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r--c++/src/H5File.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 75c9e55..e85700c 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -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::");