Permalink
Browse files

fix lint

  • Loading branch information...
1 parent 80c24c4 commit ce06e31daf1d20bdaec2dc3cb37a006d27ad9e46 @mli mli committed Apr 10, 2016
Showing with 19 additions and 13 deletions.
  1. +1 −1 Makefile
  2. +3 −5 include/ps/internal/van.h
  3. +6 −2 src/resender.h
  4. +9 −5 src/zmq_van.h
View
@@ -29,7 +29,7 @@ clean:
find src -name "*.pb.[ch]*" -delete
lint:
- python2 tests/lint.py ps all include/ps src
+ python tests/lint.py ps all include/ps src
ps: build/libps.a
@@ -59,13 +59,11 @@ class Van {
* stop receiving threads
*/
virtual void Stop();
-
/**
* \brief get next available timestamp. thread safe
*/
- int GetTimestamp() {
- return timestamp_ ++;
- }
+ int GetTimestamp() { return timestamp_++; }
+
protected:
/**
* \brief connect to a node
@@ -115,9 +113,9 @@ class Van {
std::vector<int> barrier_count_;
/** msg resender */
Resender* resender_ = nullptr;
- DISALLOW_COPY_AND_ASSIGN(Van);
int drop_rate_ = 0;
std::atomic<int> timestamp_{0};
+ DISALLOW_COPY_AND_ASSIGN(Van);
};
} // namespace ps
#endif // PS_INTERNAL_VAN_H_
View
@@ -1,6 +1,10 @@
+/**
+ * Copyright (c) 2015 by Contributors
+ */
#ifndef PS_RESENDER_H_
#define PS_RESENDER_H_
#include <chrono>
+#include <vector>
#include <unordered_set>
#include <unordered_map>
namespace ps {
@@ -133,5 +137,5 @@ class Resender {
int max_num_retry_;
Van* van_;
};
-} // namespace ps
-#endif // RESENDER_H_
+} // namespace ps
+#endif // PS_RESENDER_H_
View
@@ -1,8 +1,12 @@
-#ifndef PS_ZMQ_VAN_
-#define PS_ZMQ_VAN_
+/**
+ * Copyright (c) 2015 by Contributors
+ */
+#ifndef PS_ZMQ_VAN_H_
+#define PS_ZMQ_VAN_H_
#include <zmq.h>
-#include <thread>
#include <stdlib.h>
+#include <thread>
+#include <string>
#include "ps/internal/van.h"
namespace ps {
/**
@@ -221,9 +225,9 @@ class ZMQVan : public Van {
std::mutex mu_;
void *receiver_ = nullptr;
};
-} // namespace ps
+} // namespace ps
-#endif // PS_ZMQ_VAN_
+#endif // PS_ZMQ_VAN_H_

0 comments on commit ce06e31

Please sign in to comment.