Fixed compile errors on some macs

release/4.3a0
Vadim Indelman 2013-08-27 15:53:30 +00:00
parent 0fc7c068e5
commit 611fc14aaf
9 changed files with 17 additions and 17 deletions

View File

@ -202,7 +202,7 @@ namespace gtsam {
{
public:
/// Construct with a string describing the exception
RuntimeErrorThreadsafe(const std::string& description) : ThreadsafeException(description) {}
RuntimeErrorThreadsafe(const std::string& description) : ThreadsafeException<RuntimeErrorThreadsafe>(description) {}
};
/* ************************************************************************* */
@ -211,7 +211,7 @@ namespace gtsam {
{
public:
/// Construct with a string describing the exception
OutOfRangeThreadsafe(const std::string& description) : ThreadsafeException(description) {}
OutOfRangeThreadsafe(const std::string& description) : ThreadsafeException<OutOfRangeThreadsafe>(description) {}
};
/* ************************************************************************* */
@ -220,7 +220,7 @@ namespace gtsam {
{
public:
/// Construct with a string describing the exception
InvalidArgumentThreadsafe(const std::string& description) : ThreadsafeException(description) {}
InvalidArgumentThreadsafe(const std::string& description) : ThreadsafeException<InvalidArgumentThreadsafe>(description) {}
};
}

View File

@ -26,7 +26,7 @@ namespace gtsam {
class GTSAM_EXPORT CheiralityException: public ThreadsafeException<CheiralityException> {
public:
CheiralityException() : ThreadsafeException("Cheirality Exception") {}
CheiralityException() : ThreadsafeException<CheiralityException>("Cheirality Exception") {}
};
/**

View File

@ -239,8 +239,7 @@ namespace gtsam {
/* ************************************************************************* */
template<class BAYESTREE, class GRAPH>
template<class ETREE>
JunctionTree<BAYESTREE,GRAPH>
JunctionTree<BAYESTREE,GRAPH>::FromEliminationTree(const ETREE& eliminationTree)
JunctionTree<BAYESTREE,GRAPH>::JunctionTree(const ETREE& eliminationTree)
{
gttic(JunctionTree_FromEliminationTree);
// Here we rely on the BayesNet having been produced by this elimination tree, such that the
@ -258,13 +257,10 @@ namespace gtsam {
ConstructorTraversalVisitorPre<BAYESTREE,GRAPH,ETreeNode>, ConstructorTraversalVisitorPost<BAYESTREE,GRAPH,ETreeNode>);
// Assign roots from the dummy node
This result;
result.roots_ = rootData.myJTNode->children;
roots_ = rootData.myJTNode->children;
// Transfer remaining factors from elimination tree
result.remainingFactors_ = eliminationTree.remainingFactors();
return result;
remainingFactors_ = eliminationTree.remainingFactors();
}
/* ************************************************************************* */

View File

@ -94,7 +94,11 @@ namespace gtsam {
/** Build the junction tree from an elimination tree. */
template<class ETREE>
static This FromEliminationTree(const ETREE& eliminationTree);
static This FromEliminationTree(const ETREE& eliminationTree) { return This(eliminationTree); }
/** Build the junction tree from an elimination tree. */
template<class ETREE>
JunctionTree(const ETREE& eliminationTree);
/** Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are
* copied, factors are not cloned. */

View File

@ -106,7 +106,7 @@ VariableSlots::VariableSlots(const FG& factorGraph)
// the array entry for each factor that will indicate the factor
// does not involve the variable.
iterator thisVarSlots; bool inserted;
boost::tie(thisVarSlots, inserted) = this->insert(make_pair(involvedVariable, FastVector<size_t>()));
boost::tie(thisVarSlots, inserted) = this->insert(std::make_pair(involvedVariable, FastVector<size_t>()));
if(inserted)
thisVarSlots->second.resize(factorGraph.size(), std::numeric_limits<size_t>::max());
thisVarSlots->second[jointFactorPos] = factorVarSlot;

View File

@ -28,6 +28,6 @@ namespace gtsam {
/* ************************************************************************* */
GaussianJunctionTree::GaussianJunctionTree(
const GaussianEliminationTree& eliminationTree) :
Base(Base::FromEliminationTree(eliminationTree)) {}
Base(eliminationTree) {}
}

View File

@ -153,7 +153,7 @@ on gtsam::IndeterminantLinearSystemException for more information.\n";
/* ************************************************************************* */
class InvalidDenseElimination : public ThreadsafeException<InvalidDenseElimination> {
public:
InvalidDenseElimination(const char *message) : ThreadsafeException(message) {}
InvalidDenseElimination(const char *message) : ThreadsafeException<InvalidDenseElimination>(message) {}
};
}

View File

@ -73,7 +73,7 @@ public:
typedef boost::shared_ptr<This> shared_ptr;
ISAM2JunctionTree(const GaussianEliminationTree& eliminationTree) :
Base(Base::FromEliminationTree(eliminationTree)) {}
Base(eliminationTree) {}
};
/* ************************************************************************* */

View File

@ -28,6 +28,6 @@ namespace gtsam {
/* ************************************************************************* */
SymbolicJunctionTree::SymbolicJunctionTree(
const SymbolicEliminationTree& eliminationTree) :
Base(Base::FromEliminationTree(eliminationTree)) {}
Base(eliminationTree) {}
}