Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69546 - in trunk/boost/spirit/home/classic/iterator: . impl
From: hartmut.kaiser_at_[hidden]
Date: 2011-03-04 08:03:32


Author: hkaiser
Date: 2011-03-04 08:03:30 EST (Fri, 04 Mar 2011)
New Revision: 69546
URL: http://svn.boost.org/trac/boost/changeset/69546

Log:
Fixed #5247: mmap_file_iterator Copies String Argument
Text files modified:
   trunk/boost/spirit/home/classic/iterator/file_iterator.hpp | 2 +-
   trunk/boost/spirit/home/classic/iterator/impl/file_iterator.ipp | 6 +++---
   2 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/spirit/home/classic/iterator/file_iterator.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/iterator/file_iterator.hpp (original)
+++ trunk/boost/spirit/home/classic/iterator/file_iterator.hpp 2011-03-04 08:03:30 EST (Fri, 04 Mar 2011)
@@ -166,7 +166,7 @@
     file_iterator()
     {}
 
- file_iterator(std::string fileName)
+ file_iterator(std::string const& fileName)
     : base_t(adapted_t(fileName))
     {}
 

Modified: trunk/boost/spirit/home/classic/iterator/impl/file_iterator.ipp
==============================================================================
--- trunk/boost/spirit/home/classic/iterator/impl/file_iterator.ipp (original)
+++ trunk/boost/spirit/home/classic/iterator/impl/file_iterator.ipp 2011-03-04 08:03:30 EST (Fri, 04 Mar 2011)
@@ -63,7 +63,7 @@
     std_file_iterator()
     {}
 
- explicit std_file_iterator(std::string fileName)
+ explicit std_file_iterator(std::string const& fileName)
     {
         using namespace std;
         FILE* f = fopen(fileName.c_str(), "rb");
@@ -180,7 +180,7 @@
       : m_filesize(0), m_curChar(0)
     {}
 
- explicit mmap_file_iterator(std::string fileName)
+ explicit mmap_file_iterator(std::string const& fileName)
       : m_filesize(0), m_curChar(0)
     {
         HANDLE hFile = ::CreateFileA(
@@ -339,7 +339,7 @@
       : m_curChar(0)
     {}
 
- explicit mmap_file_iterator(std::string file_name)
+ explicit mmap_file_iterator(std::string const& file_name)
       : m_curChar(0)
     {
         // open the file


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