|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57602 - trunk/boost/iostreams/device
From: daniel_james_at_[hidden]
Date: 2009-11-12 14:17:26
Author: danieljames
Date: 2009-11-12 14:17:25 EST (Thu, 12 Nov 2009)
New Revision: 57602
URL: http://svn.boost.org/trac/boost/changeset/57602
Log:
Allocate exceptions on the stack, not the heap. Refs #3612, by Richard Smith.
Text files modified:
trunk/boost/iostreams/device/mapped_file.hpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modified: trunk/boost/iostreams/device/mapped_file.hpp
==============================================================================
--- trunk/boost/iostreams/device/mapped_file.hpp (original)
+++ trunk/boost/iostreams/device/mapped_file.hpp 2009-11-12 14:17:25 EST (Thu, 12 Nov 2009)
@@ -393,10 +393,10 @@
param_type params(p);
if (params.flags) {
if (params.flags != mapped_file::readonly)
- throw new BOOST_IOSTREAMS_FAILURE("invalid flags");
+ throw BOOST_IOSTREAMS_FAILURE("invalid flags");
} else {
if (params.mode & BOOST_IOS::out)
- throw new BOOST_IOSTREAMS_FAILURE("invalid mode");
+ throw BOOST_IOSTREAMS_FAILURE("invalid mode");
params.mode |= BOOST_IOS::in;
}
open_impl(params);
@@ -479,10 +479,10 @@
param_type params(p);
if (params.flags) {
if (params.flags & mapped_file::readonly)
- throw new BOOST_IOSTREAMS_FAILURE("invalid flags");
+ throw BOOST_IOSTREAMS_FAILURE("invalid flags");
} else {
if (params.mode & BOOST_IOS::in)
- throw new BOOST_IOSTREAMS_FAILURE("invalid mode");
+ throw BOOST_IOSTREAMS_FAILURE("invalid mode");
params.mode |= BOOST_IOS::out;
}
mapped_file::open(params);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk