Merge branch 'fix-uint' of https://github.com/rbx/FairRoot into rbx-fix-uint

This commit is contained in:
Mohammad Al-Turany 2016-03-03 15:35:36 +01:00
commit c564a3f066
2 changed files with 6 additions and 6 deletions

View File

@ -451,12 +451,12 @@ int FairMQChannel::Send(const unique_ptr<FairMQMessage>& msg) const
return -2; return -2;
} }
uint64_t FairMQChannel::Send(const std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const int64_t FairMQChannel::Send(const std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const
{ {
// Sending vector typicaly handles more then one part // Sending vector typicaly handles more then one part
if (msgVec.size() > 1) if (msgVec.size() > 1)
{ {
uint64_t totalSize = 0; int64_t totalSize = 0;
for (unsigned int i = 0; i < msgVec.size() - 1; ++i) for (unsigned int i = 0; i < msgVec.size() - 1; ++i)
{ {
@ -494,7 +494,7 @@ uint64_t FairMQChannel::Send(const std::vector<std::unique_ptr<FairMQMessage>>&
} }
} }
uint64_t FairMQChannel::Receive(std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const int64_t FairMQChannel::Receive(std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const
{ {
// Warn if the vector is filled before Receive() and empty it. // Warn if the vector is filled before Receive() and empty it.
if (msgVec.size() > 0) if (msgVec.size() > 0)
@ -503,7 +503,7 @@ uint64_t FairMQChannel::Receive(std::vector<std::unique_ptr<FairMQMessage>>& msg
msgVec.clear(); msgVec.clear();
} }
uint64_t totalSize = 0; int64_t totalSize = 0;
do do
{ {

View File

@ -170,14 +170,14 @@ class FairMQChannel
/// @param chan channel name /// @param chan channel name
/// @param i channel index /// @param i channel index
/// @return Number of bytes that have been queued. -2 If queueing was not possible or timed out. In case of errors, returns -1. /// @return Number of bytes that have been queued. -2 If queueing was not possible or timed out. In case of errors, returns -1.
uint64_t Send(const std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const; int64_t Send(const std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const;
/// Shorthand method to receive a vector of messages on `chan` at index `i` /// Shorthand method to receive a vector of messages on `chan` at index `i`
/// @param msgVec message vector reference /// @param msgVec message vector reference
/// @param chan channel name /// @param chan channel name
/// @param i channel index /// @param i channel index
/// @return Number of bytes that have been received. -2 If reading from the queue was not possible or timed out. In case of errors, returns -1. /// @return Number of bytes that have been received. -2 If reading from the queue was not possible or timed out. In case of errors, returns -1.
uint64_t Receive(std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const; int64_t Receive(std::vector<std::unique_ptr<FairMQMessage>>& msgVec) const;
// DEPRECATED socket method wrappers with raw pointers and flag checks // DEPRECATED socket method wrappers with raw pointers and flag checks
int Send(FairMQMessage* msg, const std::string& flag = "") const; int Send(FairMQMessage* msg, const std::string& flag = "") const;