Merge pull request #312 from mcmasterg/travis_clang_format

travis: clang format 5.0
This commit is contained in:
John McMaster 2018-12-10 17:25:05 -08:00 committed by GitHub
commit 75eef8f883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 13 deletions

View File

@ -1,4 +1,4 @@
CLANG_FORMAT ?= clang-format-5.0
CLANG_FORMAT ?= clang-format-3.9
.PHONY: database format clean env

View File

@ -60,7 +60,7 @@ ConfigurationBus::ConfigurationBus(T first, T last) {
std::sort(first, last,
[](const FrameAddress& lhs, const FrameAddress& rhs) {
return lhs.column() < rhs.column();
});
});
for (auto col_first = first; col_first != last;) {
auto col_last = std::upper_bound(

View File

@ -61,7 +61,7 @@ GlobalClockRegion::GlobalClockRegion(T first, T last) {
std::sort(first, last,
[](const FrameAddress& lhs, const FrameAddress& rhs) {
return lhs.row() < rhs.row();
});
});
for (auto row_first = first; row_first != last;) {
auto row_last = std::upper_bound(

View File

@ -58,7 +58,7 @@ Row::Row(T first, T last) {
std::sort(first, last,
[](const FrameAddress& lhs, const FrameAddress& rhs) {
return lhs.block_type() < rhs.block_type();
});
});
for (auto bus_first = first; bus_first != last;) {
auto bus_last = std::upper_bound(

View File

@ -43,14 +43,12 @@ TEST(ConfigurationTest, ConstructFromPacketsWithSingleFrame) {
{
static_cast<unsigned int>(0x1),
xc7series::ConfigurationPacket::Opcode::Write,
xc7series::ConfigurationRegister::CMD,
absl::MakeSpan(cmd),
xc7series::ConfigurationRegister::CMD, absl::MakeSpan(cmd),
},
{
static_cast<unsigned int>(0x1),
xc7series::ConfigurationPacket::Opcode::Write,
xc7series::ConfigurationRegister::FDRI,
absl::MakeSpan(frame),
xc7series::ConfigurationRegister::FDRI, absl::MakeSpan(frame),
},
};
@ -96,14 +94,12 @@ TEST(ConfigurationTest, ConstructFromPacketsWithAutoincrement) {
{
static_cast<unsigned int>(0x1),
xc7series::ConfigurationPacket::Opcode::Write,
xc7series::ConfigurationRegister::CMD,
absl::MakeSpan(cmd),
xc7series::ConfigurationRegister::CMD, absl::MakeSpan(cmd),
},
{
static_cast<unsigned int>(0x1),
xc7series::ConfigurationPacket::Opcode::Write,
xc7series::ConfigurationRegister::FDRI,
absl::MakeSpan(frame),
xc7series::ConfigurationRegister::FDRI, absl::MakeSpan(frame),
},
};

View File

@ -84,7 +84,7 @@ int patch_frames(
frame_data_strings.end(), frame_data.begin(),
[](const std::string& val) -> uint32_t {
return std::stoul(val, nullptr, 16);
});
});
uint32_t ecc = 0;
for (size_t ii = 0; ii < frame_data.size(); ++ii) {