Skip to content

Commit 5daf1d3

Browse files
[signal-cast-helper] Removed unused template specialization
This commit removes template specialization not exposed in header files, and better handled by the default implementation.
1 parent eb1f332 commit 5daf1d3

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/signal/signal-cast-helper.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,36 +52,6 @@ inline boost::any DefaultCastRegisterer<double>::cast(std::istringstream &iss) {
5252
}
5353
}
5454

55-
/* Specialize Matrix and Vector traces. */
56-
57-
template <>
58-
void DefaultCastRegisterer<dynamicgraph::Vector>::trace(
59-
const boost::any &object, std::ostream &os) {
60-
const dynamicgraph::Vector &v = boost::any_cast<dynamicgraph::Vector>(object);
61-
for (int i = 0; i < v.size(); ++i) {
62-
os << "\t" << v(i);
63-
}
64-
}
65-
66-
template <>
67-
void DefaultCastRegisterer<dynamicgraph::Matrix>::trace(
68-
const boost::any &object, std::ostream &os) {
69-
const dynamicgraph::Matrix &m = boost::any_cast<dynamicgraph::Matrix>(object);
70-
for (int i = 0; i < m.rows(); ++i)
71-
for (int j = 0; j < m.cols(); ++j) {
72-
os << "\t" << m(i, j);
73-
}
74-
}
75-
76-
// for std::string, do not check failure. If input stream contains an
77-
// empty string, iss.fail() returns true and an exception is thrown
78-
template <>
79-
inline boost::any
80-
DefaultCastRegisterer<std::string>::cast(std::istringstream &iss) {
81-
std::string inst(iss.str());
82-
return inst;
83-
}
84-
8555
// for std::string, do not add std::endl at the end of the stream.
8656
template <>
8757
inline void DefaultCastRegisterer<std::string>::disp(const boost::any &object,

0 commit comments

Comments
 (0)