From 1f45a846c64420b56fb9da13d963f97035a18525 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 20 Mar 2001 02:13:28 +0000 Subject: [PATCH] VC++ 6.0 fixes and misc. other modifications. [SVN r9601] --- example/getting_started4.cpp | 9 ++++----- example/getting_started5.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/example/getting_started4.cpp b/example/getting_started4.cpp index cf6c2ff2..fe6a3421 100644 --- a/example/getting_started4.cpp +++ b/example/getting_started4.cpp @@ -15,7 +15,7 @@ namespace { // Avoid cluttering the global namespace. vector_double_wrapper(PyObject* self) : std::vector() {} - vector_double_wrapper(PyObject* self, const int n) + vector_double_wrapper(PyObject* self, int n) : std::vector(n) {} vector_double_wrapper(PyObject* self, python::tuple tuple) @@ -28,17 +28,16 @@ namespace { // Avoid cluttering the global namespace. } }; - double getitem(const std::vector& vd, const std::size_t key) { + double getitem(const std::vector& vd, std::size_t key) { return vd[key]; } - void setitem(std::vector& vd, const std::size_t key, - const double &d) { + void setitem(std::vector& vd, std::size_t key, double d) { std::vector::iterator vditer = vd.begin(); vditer[key] = d; } - void delitem(std::vector& vd, const std::size_t key) { + void delitem(std::vector& vd, std::size_t key) { std::vector::iterator vditer = vd.begin(); vd.erase(&vditer[key]); } diff --git a/example/getting_started5.cpp b/example/getting_started5.cpp index be033224..9e9e7c75 100644 --- a/example/getting_started5.cpp +++ b/example/getting_started5.cpp @@ -60,7 +60,7 @@ namespace { // Avoid cluttering the global namespace. std::vector VMIx; public: void add(const MillerIndex& MIx) { VMIx.push_back(MIx); } - MillerIndex get(const std::size_t i) const { return VMIx[i]; } + MillerIndex get(std::size_t i) const { return VMIx[i]; } }; }