summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c771a55)
* use <tr1/unordered_map> for process::rev_neigh
* update setlocalversion to use -dirty suffix
+process::~process()
+{
+}
+
int process::run()
{
bool one_more = true;
int process::run()
{
bool one_more = true;
#ifndef PROCESS_H
#define PROCESS_H
#ifndef PROCESS_H
#define PROCESS_H
+#define USE_UNORDERED_MAP 1
+//#undef USE_UNORDERED_MAP
+
+#ifdef USE_UNORDERED_MAP
+# include <tr1/unordered_map>
+# define MAP_TEMPLATE std::tr1::unordered_map
+#else
+# include <map>
+# define MAP_TEMPLATE std::map
+#endif
#include <msg/msg.h>
#include "communicator.h"
#include "neighbor.h"
#include <msg/msg.h>
#include "communicator.h"
#include "neighbor.h"
class process {
public:
process(int argc, char* argv[]);
class process {
public:
process(int argc, char* argv[]);
int run();
private:
std::vector<neighbor> neigh;
int run();
private:
std::vector<neighbor> neigh;
- std::map<m_host_t, neighbor*> rev_neigh;
+ MAP_TEMPLATE<m_host_t, neighbor*> rev_neigh;
+ std::vector<neighbor*> pneigh;
communicator comm;
int ctrl_close_pending;
communicator comm;
int ctrl_close_pending;
+# Inspired by linux-2.6/scripts/setlocalversion
+
fi
head=$(git rev-parse --verify --short HEAD)
printf "~git-%s" "$head"
fi
head=$(git rev-parse --verify --short HEAD)
printf "~git-%s" "$head"
+ # Check for uncommitted changes
+ if git diff-index --name-only HEAD | read dummy; then
+ printf '%s' "-dirty"
+ fi
+
}
[ -f "$FILE" ] || touch "$FILE"
}
[ -f "$FILE" ] || touch "$FILE"