Fix warnings on incorrect for range reference bindings
parent
406060b457
commit
8165291704
|
@ -89,7 +89,7 @@ void TimingOutline::print(const std::string& outline) const {
|
|||
childOrder[child.second->myOrder_] = child.second;
|
||||
}
|
||||
// Print children
|
||||
for(const ChildOrder::value_type order_child: childOrder) {
|
||||
for(const ChildOrder::value_type& order_child: childOrder) {
|
||||
std::string childOutline(outline);
|
||||
childOutline += "| ";
|
||||
order_child.second->print(childOutline);
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace gtsam {
|
|||
for(Key j: f.keys()) cs[j] = f.cardinality(j);
|
||||
// Convert map into keys
|
||||
DiscreteKeys keys;
|
||||
for(const DiscreteKey& key: cs)
|
||||
for(const std::pair<const Key,size_t>& key: cs)
|
||||
keys.push_back(key);
|
||||
// apply operand
|
||||
ADT result = ADT::apply(f, op);
|
||||
|
|
|
@ -56,7 +56,7 @@ bool Potentials::equals(const Potentials& other, double tol) const {
|
|||
/* ************************************************************************* */
|
||||
void Potentials::print(const string& s, const KeyFormatter& formatter) const {
|
||||
cout << s << "\n Cardinalities: {";
|
||||
for (const DiscreteKey& key : cardinalities_)
|
||||
for (const std::pair<const Key,size_t>& key : cardinalities_)
|
||||
cout << formatter(key.first) << ":" << key.second << ", ";
|
||||
cout << "}" << endl;
|
||||
ADT::print(" ");
|
||||
|
|
|
@ -145,7 +145,7 @@ void BlockJacobiPreconditioner::build(
|
|||
|
||||
/* getting the block diagonals over the factors */
|
||||
std::map<Key, Matrix> hessianMap =gfg.hessianBlockDiagonal();
|
||||
for ( const Matrix hessian: hessianMap | boost::adaptors::map_values)
|
||||
for (const Matrix& hessian: hessianMap | boost::adaptors::map_values)
|
||||
blocks.push_back(hessian);
|
||||
|
||||
/* if necessary, allocating the memory for cacheing the factorization results */
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
VectorValues::VectorValues(const Vector& x, const Dims& dims) {
|
||||
typedef pair<Key, size_t> Pair;
|
||||
using Pair = pair<const Key, size_t>;
|
||||
size_t j = 0;
|
||||
for (const Pair& v : dims) {
|
||||
Key key;
|
||||
|
|
|
@ -73,8 +73,8 @@ string findExampleDataFile(const string& name) {
|
|||
namesToSearch.push_back(name + ".xml");
|
||||
|
||||
// Find first name that exists
|
||||
for(const fs::path& root: rootsToSearch) {
|
||||
for(const fs::path& name: namesToSearch) {
|
||||
for(const fs::path root: rootsToSearch) {
|
||||
for(const fs::path name: namesToSearch) {
|
||||
if (fs::is_regular_file(root / name))
|
||||
return (root / name).string();
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ void Module::parseMarkup(const std::string& data) {
|
|||
// Create type attributes table and check validity
|
||||
typeAttributes.addClasses(expandedClasses);
|
||||
typeAttributes.addForwardDeclarations(forward_declarations);
|
||||
for (const TypedefPair p: typedefs)
|
||||
for (const TypedefPair& p: typedefs)
|
||||
typeAttributes.addType(p.newType);
|
||||
// add Eigen types as template arguments are also checked ?
|
||||
vector<ForwardDeclaration> eigen;
|
||||
|
|
Loading…
Reference in New Issue