mirror of https://github.com/openXC7/prjxray.git
Merge pull request #312 from mcmasterg/travis_clang_format
travis: clang format 5.0
This commit is contained in:
commit
75eef8f883
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
CLANG_FORMAT ?= clang-format-5.0
|
CLANG_FORMAT ?= clang-format-3.9
|
||||||
|
|
||||||
.PHONY: database format clean env
|
.PHONY: database format clean env
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ ConfigurationBus::ConfigurationBus(T first, T last) {
|
||||||
std::sort(first, last,
|
std::sort(first, last,
|
||||||
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
||||||
return lhs.column() < rhs.column();
|
return lhs.column() < rhs.column();
|
||||||
});
|
});
|
||||||
|
|
||||||
for (auto col_first = first; col_first != last;) {
|
for (auto col_first = first; col_first != last;) {
|
||||||
auto col_last = std::upper_bound(
|
auto col_last = std::upper_bound(
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ GlobalClockRegion::GlobalClockRegion(T first, T last) {
|
||||||
std::sort(first, last,
|
std::sort(first, last,
|
||||||
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
||||||
return lhs.row() < rhs.row();
|
return lhs.row() < rhs.row();
|
||||||
});
|
});
|
||||||
|
|
||||||
for (auto row_first = first; row_first != last;) {
|
for (auto row_first = first; row_first != last;) {
|
||||||
auto row_last = std::upper_bound(
|
auto row_last = std::upper_bound(
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ Row::Row(T first, T last) {
|
||||||
std::sort(first, last,
|
std::sort(first, last,
|
||||||
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
[](const FrameAddress& lhs, const FrameAddress& rhs) {
|
||||||
return lhs.block_type() < rhs.block_type();
|
return lhs.block_type() < rhs.block_type();
|
||||||
});
|
});
|
||||||
|
|
||||||
for (auto bus_first = first; bus_first != last;) {
|
for (auto bus_first = first; bus_first != last;) {
|
||||||
auto bus_last = std::upper_bound(
|
auto bus_last = std::upper_bound(
|
||||||
|
|
|
||||||
|
|
@ -43,14 +43,12 @@ TEST(ConfigurationTest, ConstructFromPacketsWithSingleFrame) {
|
||||||
{
|
{
|
||||||
static_cast<unsigned int>(0x1),
|
static_cast<unsigned int>(0x1),
|
||||||
xc7series::ConfigurationPacket::Opcode::Write,
|
xc7series::ConfigurationPacket::Opcode::Write,
|
||||||
xc7series::ConfigurationRegister::CMD,
|
xc7series::ConfigurationRegister::CMD, absl::MakeSpan(cmd),
|
||||||
absl::MakeSpan(cmd),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
static_cast<unsigned int>(0x1),
|
static_cast<unsigned int>(0x1),
|
||||||
xc7series::ConfigurationPacket::Opcode::Write,
|
xc7series::ConfigurationPacket::Opcode::Write,
|
||||||
xc7series::ConfigurationRegister::FDRI,
|
xc7series::ConfigurationRegister::FDRI, absl::MakeSpan(frame),
|
||||||
absl::MakeSpan(frame),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -96,14 +94,12 @@ TEST(ConfigurationTest, ConstructFromPacketsWithAutoincrement) {
|
||||||
{
|
{
|
||||||
static_cast<unsigned int>(0x1),
|
static_cast<unsigned int>(0x1),
|
||||||
xc7series::ConfigurationPacket::Opcode::Write,
|
xc7series::ConfigurationPacket::Opcode::Write,
|
||||||
xc7series::ConfigurationRegister::CMD,
|
xc7series::ConfigurationRegister::CMD, absl::MakeSpan(cmd),
|
||||||
absl::MakeSpan(cmd),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
static_cast<unsigned int>(0x1),
|
static_cast<unsigned int>(0x1),
|
||||||
xc7series::ConfigurationPacket::Opcode::Write,
|
xc7series::ConfigurationPacket::Opcode::Write,
|
||||||
xc7series::ConfigurationRegister::FDRI,
|
xc7series::ConfigurationRegister::FDRI, absl::MakeSpan(frame),
|
||||||
absl::MakeSpan(frame),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ int patch_frames(
|
||||||
frame_data_strings.end(), frame_data.begin(),
|
frame_data_strings.end(), frame_data.begin(),
|
||||||
[](const std::string& val) -> uint32_t {
|
[](const std::string& val) -> uint32_t {
|
||||||
return std::stoul(val, nullptr, 16);
|
return std::stoul(val, nullptr, 16);
|
||||||
});
|
});
|
||||||
|
|
||||||
uint32_t ecc = 0;
|
uint32_t ecc = 0;
|
||||||
for (size_t ii = 0; ii < frame_data.size(); ++ii) {
|
for (size_t ii = 0; ii < frame_data.size(); ++ii) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue