Skip to content

Commit 1707ea4

Browse files
ljbadegjasny
authored andcommitted
Set clang-format to always left align references and pointers
1 parent 47838c7 commit 1707ea4

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BasedOnStyle: Google
2+
DerivePointerAlignment: false

core/src/detail/hash.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ namespace detail {
1111
/// It's the boundary condition of this serial functions.
1212
///
1313
/// \param seed Not effect.
14-
inline void hash_combine(std::size_t *) {}
14+
inline void hash_combine(std::size_t*) {}
1515

1616
/// \brief Combine the given hash value with another obeject.
1717
///
1818
/// \param seed The given hash value. It's a input/output parameter.
1919
/// \param value The object that will be combined with the given hash value.
2020
template <typename T>
21-
inline void hash_combine(std::size_t *seed, const T &value) {
21+
inline void hash_combine(std::size_t* seed, const T& value) {
2222
*seed ^= std::hash<T>{}(value) + 0x9e3779b9 + (*seed << 6) + (*seed >> 2);
2323
}
2424

@@ -28,8 +28,8 @@ inline void hash_combine(std::size_t *seed, const T &value) {
2828
/// \param value The object that will be combined with the given hash value.
2929
/// \param args The objects that will be combined with the given hash value.
3030
template <typename T, typename... Types>
31-
inline void hash_combine(std::size_t *seed, const T &value,
32-
const Types &...args) {
31+
inline void hash_combine(std::size_t* seed, const T& value,
32+
const Types&... args) {
3333
hash_combine(seed, value);
3434
hash_combine(seed, args...);
3535
}
@@ -39,7 +39,7 @@ inline void hash_combine(std::size_t *seed, const T &value,
3939
/// \param args The arguments that will be computed hash value.
4040
/// \return The hash value of the given args.
4141
template <typename... Types>
42-
inline std::size_t hash_value(const Types &...args) {
42+
inline std::size_t hash_value(const Types&... args) {
4343
std::size_t seed = 0;
4444
hash_combine(&seed, args...);
4545
return seed;

core/src/serializer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace prometheus {
66

77
std::string Serializer::Serialize(
8-
const std::vector<MetricFamily> &metrics) const {
8+
const std::vector<MetricFamily>& metrics) const {
99
std::ostringstream ss;
1010
Serialize(ss, metrics);
1111
return ss.str();

0 commit comments

Comments
 (0)