Skip to content

Commit

Permalink
Fixed multiple formatting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan committed May 28, 2017
1 parent 4a586ff commit de90953
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
21 changes: 10 additions & 11 deletions jb/fixed_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ template <std::size_t wire_size_value>
class fixed_string
: public boost::less_than_comparable<fixed_string<wire_size_value>>,
public boost::equality_comparable<fixed_string<wire_size_value>>,
public boost::less_than_comparable<
fixed_string<wire_size_value>, char const*>,
public boost::equality_comparable<
fixed_string<wire_size_value>, char const*>,
public boost::less_than_comparable<
fixed_string<wire_size_value>, std::string>,
public boost::equality_comparable<
fixed_string<wire_size_value>, std::string> {
public boost::less_than_comparable<fixed_string<wire_size_value>,
char const*>,
public boost::equality_comparable<fixed_string<wire_size_value>,
char const*>,
public boost::less_than_comparable<fixed_string<wire_size_value>,
std::string>,
public boost::equality_comparable<fixed_string<wire_size_value>,
std::string> {
public:
/// The size of the field on the wire
constexpr static std::size_t wire_size = wire_size_value;
Expand Down Expand Up @@ -118,8 +118,7 @@ class fixed_string

/// Streaming operator for jb::mktdata::fixed_string<>
template <std::size_t size>
std::ostream&
operator<<(std::ostream& os, fixed_string<size> const& x) {
std::ostream& operator<<(std::ostream& os, fixed_string<size> const& x) {
return os << x.str();
}

Expand All @@ -131,7 +130,7 @@ std::size_t hash_value(fixed_string<size> const& x) {
}

/// Define the constexpr
template<std::size_t size>
template <std::size_t size>
constexpr std::size_t fixed_string<size>::wire_size;

} // namespace jb
Expand Down
1 change: 0 additions & 1 deletion jb/pitch2/time_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ std::ostream& operator<<(std::ostream& os, time_message const& x) {

} // namespace pitch2
} // namespace jb

1 change: 0 additions & 1 deletion jb/pitch2/unit_clear_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ std::ostream& operator<<(std::ostream& os, unit_clear_message const& x) {

} // namespace pitch2
} // namespace jb

7 changes: 3 additions & 4 deletions jb/pitch2/ut_time_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ BOOST_AUTO_TEST_CASE(time_message_basic) {
BOOST_CHECK_EQUAL(true, std::is_pod<time_message>::value);
BOOST_CHECK_EQUAL(sizeof(time_message), std::size_t(6));

char const buf[] =
u8"\x06" // Length (6)
"\x20" // Message Type (32)
"\x98\x85\x00\x00" // Time (34200 seconds)
char const buf[] = u8"\x06" // Length (6)
"\x20" // Message Type (32)
"\x98\x85\x00\x00" // Time (34200 seconds)
;
time_message msg;
BOOST_REQUIRE_EQUAL(sizeof(buf) - 1, sizeof(msg));
Expand Down
7 changes: 3 additions & 4 deletions jb/pitch2/ut_unit_clear_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ BOOST_AUTO_TEST_CASE(unit_clear_message_basic) {
BOOST_CHECK_EQUAL(true, std::is_pod<unit_clear_message>::value);
BOOST_CHECK_EQUAL(sizeof(unit_clear_message), std::size_t(6));

char const buf[] =
u8"\x06" // Length (6)
"\x97" // Message Type (0x97)
"\x18\xD2\x06\x00" // Time Offset (447,000 ns)
char const buf[] = u8"\x06" // Length (6)
"\x97" // Message Type (0x97)
"\x18\xD2\x06\x00" // Time Offset (447,000 ns)
;
unit_clear_message msg;
BOOST_REQUIRE_EQUAL(sizeof(buf) - 1, sizeof(msg));
Expand Down

0 comments on commit de90953

Please sign in to comment.