[PATCH] avoid warnings from dont-use-functions.
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Thu Jan 23 19:47:20 UTC 2003
The following patch changes dont-use functions to cause link-time rather
than runtime errors.
Ok?
Richard.
2003Jan23 Richard Guenther <richard.guenther at uni-tuebingen.de>
* src/Field/FieldCentering.cmpl.cpp: dont define
canonicalCentering<Dim>(...) for unsupported dimensions.
src/Particles/AttributeWrapper.h: dont define AttributeWrapper(),
destructor and assignment operator.
src/Particles/KillBC.h: dont define ParticleBC().
# This is a BitKeeper generated patch for the following project:
# Project Name: pooma/cheetah repository tracking CVS/tarball
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.22 -> 1.23
# r2/src/Particles/KillBC.h 1.1 -> 1.2
# r2/src/Field/FieldCentering.cmpl.cpp 1.3 -> 1.4
# r2/src/Particles/AttributeWrapper.h 1.1 -> 1.2
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/23 rguenth at bellatrix.tat.physik.uni-tuebingen.de 1.23
# Turn runtime error into link-time error to avoid -ansi/-pedantic failures
# --------------------------------------------
#
diff -Nru a/r2/src/Field/FieldCentering.cmpl.cpp b/r2/src/Field/FieldCentering.cmpl.cpp
--- a/r2/src/Field/FieldCentering.cmpl.cpp Thu Jan 23 20:43:20 2003
+++ b/r2/src/Field/FieldCentering.cmpl.cpp Thu Jan 23 20:43:20 2003
@@ -314,10 +314,7 @@
const Centering<Dim> canonicalCentering
(const enum CenteringType type,
const enum ContinuityType discontinuous,
- const int dimension)
-{
- PInsist (false, "Unsupported dimension.");
-}
+ const int dimension); // Unsupported dimension
template <>
const Centering<1> canonicalCentering<1>
diff -Nru a/r2/src/Particles/AttributeWrapper.h b/r2/src/Particles/AttributeWrapper.h
--- a/r2/src/Particles/AttributeWrapper.h Thu Jan 23 20:43:20 2003
+++ b/r2/src/Particles/AttributeWrapper.h Thu Jan 23 20:43:20 2003
@@ -208,21 +208,11 @@
// Make copy consructor, default constructor, and operator= private
// and undefined since they should not be used
- AttributeWrapper()
- {
- PInsist(false, "Called AttributeWrapper<T> default constructor.");
- }
+ AttributeWrapper();
- AttributeWrapper(const This_t &)
- {
- PInsist(false, "Called AttributeWrapper<T> copy constructor.");
- }
+ AttributeWrapper(const This_t &);
- const This_t &operator=(const This_t &)
- {
- PInsist(false, "Called AttributeWrapper<T> operator=.");
- return *this;
- }
+ const This_t &operator=(const This_t &);
};
diff -Nru a/r2/src/Particles/KillBC.h b/r2/src/Particles/KillBC.h
--- a/r2/src/Particles/KillBC.h Thu Jan 23 20:43:20 2003
+++ b/r2/src/Particles/KillBC.h Thu Jan 23 20:43:20 2003
@@ -162,7 +162,7 @@
private:
// Can't call default constructor.
- ParticleBC() { }
+ ParticleBC();
// Subject of the boundary condition.
Subject_t subject_m;
More information about the pooma-dev
mailing list