more (trivial) cleanup and renaming
This commit is contained in:
parent
d1c64dd1c0
commit
145ad6c3a5
8 changed files with 18 additions and 12 deletions
|
|
@ -54,7 +54,7 @@
|
|||
#include "lib/error.hpp"
|
||||
#include "lib/sync-classlock.hpp"
|
||||
#include "lib/scoped-holder.hpp"
|
||||
#include "lib/scopedholdertransfer.hpp"
|
||||
#include "lib/scoped-holder-transfer.hpp"
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
SCOPEDHOLDERVECTOR.hpp - using ScopedHolder within a STL vector
|
||||
SCOPED-HOLDER-TRANSFER.hpp - using ScopedHolder within a STL vector
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
|
||||
|
||||
#ifndef LIB_SCOPEDHOLDERVECTOR_H
|
||||
#define LIB_SCOPEDHOLDERVECTOR_H
|
||||
#ifndef LIB_SCOPEDHOLDER_TRANSFER_H
|
||||
#define LIB_SCOPEDHOLDER_TRANSFER_H
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include <memory>
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
** friend function.
|
||||
**
|
||||
** @see scoped-holder-test.cpp
|
||||
** @see scopedholdertransfer.hpp use in std::vector
|
||||
** @see scoped-holder-transfer.hpp use in std::vector
|
||||
** @see AllocationCluster usage example
|
||||
** @see scoped-ptrvect.hpp simple pointer-holding collection
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ namespace lib {
|
|||
|
||||
|
||||
private:
|
||||
/** @internal element access, including null check */
|
||||
/** @internal element access, including range and null check */
|
||||
T*
|
||||
get (size_type i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ test_lib_SOURCES = \
|
|||
$(testlib_srcdir)/sanitised-identifier-test.cpp \
|
||||
$(testlib_srcdir)/scoped-holder-test.cpp \
|
||||
$(testlib_srcdir)/scoped-ptrvect-test.cpp \
|
||||
$(testlib_srcdir)/scopedholdertransfertest.cpp \
|
||||
$(testlib_srcdir)/scoped-holder-transfer-test.cpp \
|
||||
$(testlib_srcdir)/singleton-subclass-test.cpp \
|
||||
$(testlib_srcdir)/singleton-test.cpp \
|
||||
$(testlib_srcdir)/singletontestmocktest.cpp \
|
||||
|
|
@ -106,7 +106,7 @@ test_lib_SOURCES = \
|
|||
$(testlib_srcdir)/typed-allocation-manager-test.cpp \
|
||||
$(testlib_srcdir)/typed-counter-test.cpp \
|
||||
$(testlib_srcdir)/util-foreach-test.cpp \
|
||||
$(testlib_srcdir)/vectortransfertest.cpp \
|
||||
$(testlib_srcdir)/vector-transfer-test.cpp \
|
||||
$(testlib_srcdir)/visitingtoolconcept.cpp \
|
||||
$(testlib_srcdir)/visitingtoolextendedtest.cpp \
|
||||
$(testlib_srcdir)/visitingtooltest.cpp
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include "lib/util.hpp"
|
||||
|
||||
#include "lib/scoped-holder.hpp"
|
||||
#include "lib/scopedholdertransfer.hpp"
|
||||
#include "lib/scoped-holder-transfer.hpp"
|
||||
#include "testdummy.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -68,8 +68,7 @@ namespace lib {
|
|||
if (throw_in_transfer)
|
||||
throw to.getVal();
|
||||
|
||||
to.setVal (from.getVal());
|
||||
from.setVal(0);
|
||||
swap (from,to);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
namespace lib {
|
||||
|
|
@ -63,6 +64,12 @@ namespace test{
|
|||
val_ = newVal;
|
||||
}
|
||||
|
||||
friend void
|
||||
swap (Dummy& dum1, Dummy& dum2) ///< checksum neutral
|
||||
{
|
||||
std::swap(dum1.val_, dum2.val_);
|
||||
}
|
||||
|
||||
private:
|
||||
void
|
||||
init()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "lib/test/run.hpp"
|
||||
|
||||
#include "lib/scopedholdertransfer.hpp"
|
||||
#include "lib/scoped-holder-transfer.hpp"
|
||||
#include "testdummy.hpp"
|
||||
|
||||
#include <iostream>
|
||||
Loading…
Reference in a new issue