shared pointer is now from std C++/11; refs #26

master
Marc Wäckerlin 12 years ago
parent acd825d6fa
commit 8558d370f0
  1. 5
      NEWS
  2. 2
      libpcscxx.spec.in
  3. 10
      src/pcsc.hxx

@ -0,0 +1,5 @@
Now requires a C++ 11 compiler.
For gcc, configure with:
CPPFLAGS=-std=c++0x ./configure

@ -6,7 +6,7 @@ License: LGPL
Group: Development/Libraries/C++
URL: https://dev.marc.waeckerlin.org/projects/@PACKAGENAME@
Source0: %{name}-%{version}.tar.gz
BuildRequires: subversion gcc-c++ doxygen graphviz texlive automake autoconf libtool make pcsc-lite-devel boost-devel
BuildRequires: subversion gcc-c++ doxygen graphviz texlive automake autoconf libtool make pcsc-lite-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: cppunit-devel openssl-devel

@ -73,7 +73,6 @@
}
#endif
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include <memory>
@ -257,7 +256,6 @@ namespace pcsc {
claInsP1P2.push_back(ins);
claInsP1P2.push_back(p1);
claInsP1P2.push_back(p2);
assert(claInsP1P2.size()==4);
return transmit(claInsP1P2, lc, le);
}
@ -270,7 +268,6 @@ namespace pcsc {
claInsP1P2.push_back(ins);
claInsP1P2.push_back(p1);
claInsP1P2.push_back(p2);
assert(claInsP1P2.size()==4);
return transmit(claInsP1P2, std::string(), le);
}
@ -284,7 +281,6 @@ namespace pcsc {
claInsP1P2.push_back(ins);
claInsP1P2.push_back(p1);
claInsP1P2.push_back(p2);
assert(claInsP1P2.size()==4);
return transmit(claInsP1P2, std::string(lc, len), le);
}
@ -523,7 +519,9 @@ namespace pcsc {
connection to the reader, then access it. */
Reader& reader(const std::string& name) {
if (_reader.find(name)==_reader.end())
_reader.insert(std::make_pair(name, new Reader(name, *this)));
_reader.insert
(std::make_pair
(name, std::shared_ptr<Reader>(new Reader(name, *this))));
return *_reader.find(name)->second;
}
@ -832,7 +830,7 @@ namespace pcsc {
bool _exc;
SCARDCONTEXT _id;
long _state;
std::map<std::string, boost::shared_ptr<Reader> > _reader;
std::map<std::string, std::shared_ptr<Reader> > _reader;
};

Loading…
Cancel
Save