Skip to content

Commit

Permalink
3822: Format lib/kdl
Browse files Browse the repository at this point in the history
  • Loading branch information
kduske committed Nov 13, 2021
1 parent 9a8085f commit 143764e
Show file tree
Hide file tree
Showing 59 changed files with 13,052 additions and 12,662 deletions.
920 changes: 448 additions & 472 deletions lib/kdl/include/kdl/binary_relation.h

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions lib/kdl/include/kdl/bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,27 @@
#include <vector>

namespace kdl {
class bitset {
private:
std::vector<bool> m_bits;
public:
bitset(const size_t initialSize = 64) :
m_bits(initialSize, false) {}

bool operator[](const size_t index) const {
if (index >= m_bits.size())
return false;
return m_bits[index];
}

std::vector<bool>::reference operator[](const size_t index) {
if (index >= m_bits.size()) {
m_bits.insert(std::end(m_bits), index - m_bits.size() + 1, false);
}
return m_bits[index];
}

void reset() {
m_bits = std::vector<bool>(64, false);
}
};
}
class bitset {
private:
std::vector<bool> m_bits;

public:
bitset(const size_t initialSize = 64)
: m_bits(initialSize, false) {}

bool operator[](const size_t index) const {
if (index >= m_bits.size())
return false;
return m_bits[index];
}

std::vector<bool>::reference operator[](const size_t index) {
if (index >= m_bits.size()) {
m_bits.insert(std::end(m_bits), index - m_bits.size() + 1, false);
}
return m_bits[index];
}

void reset() { m_bits = std::vector<bool>(64, false); }
};
} // namespace kdl
474 changes: 242 additions & 232 deletions lib/kdl/include/kdl/collection_utils.h

Large diffs are not rendered by default.

Loading

0 comments on commit 143764e

Please sign in to comment.