Fix code to support VS2013

This commit is contained in:
gabi
2014-03-04 01:23:38 +02:00
parent 8b27eb0f01
commit 57fe78f1c6
7 changed files with 36 additions and 32 deletions

View File

@@ -58,8 +58,7 @@ public:
// If the queue is full, block the calling thread until there is room.
template<typename TT>
void push(TT&& item) {
constexpr std::chrono::hours one_hour(1);
while (!push(std::forward<TT>(item), one_hour));
while (!push(std::forward<TT>(item), std::chrono::hours(1)));
}
// Pop a copy of the front item in the queue into the given item ref.
@@ -86,8 +85,7 @@ public:
// Pop a copy of the front item in the queue into the given item ref.
// If the queue is empty, block the calling thread util there is item to pop.
void pop(T& item) {
constexpr std::chrono::hours one_hour(1);
while (!pop(item, one_hour));
while (!pop(item, std::chrono::hours(1)));
}
// Clear the queue