[asterisk-scf-commits] asterisk-scf/release/ice-util-cpp.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri May 6 11:07:07 CDT 2011


branch "master" has been updated
       via  dc4d62e50227c64b90fec7aff70680efd7e6c27b (commit)
       via  0ea7b0d895f92759eca322afabe102f5a4d79507 (commit)
      from  2d8c9dee3f4fa63ff0125bf4ccb1fc6862612f76 (commit)

Summary of changes:
 ThreadPool/src/ThreadPool.cpp                      |    8 ++++----
 ThreadPool/test/TestThreadPool.cpp                 |    2 +-
 .../include/AsteriskSCF/DefaultQueueListener.h     |    2 +-
 .../include/AsteriskSCF/SuspendableWorkQueue.h     |    2 +-
 WorkQueue/include/AsteriskSCF/WorkQueue.h          |    2 +-
 WorkQueue/src/DefaultQueueListener.cpp             |    2 +-
 WorkQueue/src/SuspendableWorkQueue.cpp             |    4 ++--
 WorkQueue/src/WorkQueue.cpp                        |    6 +++---
 WorkQueue/test/TestSuspendableWorkQueue.cpp        |    2 +-
 WorkQueue/test/TestWorkQueue.cpp                   |    2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit dc4d62e50227c64b90fec7aff70680efd7e6c27b
Merge: 0ea7b0d 2d8c9de
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri May 6 11:07:06 2011 -0500

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/ice-util-cpp


commit 0ea7b0d895f92759eca322afabe102f5a4d79507
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri May 6 11:04:24 2011 -0500

    Change from int to Ice::Long for queue size numbers and cast where necessary
    to avoid warnings on later GCC compilers.

diff --git a/ThreadPool/src/ThreadPool.cpp b/ThreadPool/src/ThreadPool.cpp
index 775154c..a8cfbfa 100644
--- a/ThreadPool/src/ThreadPool.cpp
+++ b/ThreadPool/src/ThreadPool.cpp
@@ -300,7 +300,7 @@ public:
     class WorkAdded : public Work
     {
     public:
-        WorkAdded(int numNewWork, bool wasEmpty, ThreadPool *pool)
+        WorkAdded(Ice::Long numNewWork, bool wasEmpty, ThreadPool *pool)
             : mNewWork(numNewWork), mWasEmpty(wasEmpty), mPool(pool) { }
         
         void execute()
@@ -315,14 +315,14 @@ public:
             mPool->mIdleThreads.erase(mPool->mIdleThreads.begin(), mPool->mIdleThreads.end());
         }
     private:
-        const int mNewWork;
+        const Ice::Long mNewWork;
         const bool mWasEmpty;
         ThreadPool *mPool;
     };
 
     typedef IceUtil::Handle<WorkAdded> WorkAddedPtr;
 
-    void handleWorkAdded(int numNewWork, bool wasEmpty)
+    void handleWorkAdded(Ice::Long numNewWork, bool wasEmpty)
     {
         boost::lock_guard<boost::mutex> lock(mQueueLock);
         if (!mShuttingDown)
@@ -414,7 +414,7 @@ public:
     /**
      * Results in PoolListener::queueWorkAdded being called
      */
-    void workAdded(int numNewWork, bool wasEmpty)
+    void workAdded(Ice::Long numNewWork, bool wasEmpty)
     {
         mThreadPool->handleWorkAdded(numNewWork, wasEmpty);
     }
diff --git a/ThreadPool/test/TestThreadPool.cpp b/ThreadPool/test/TestThreadPool.cpp
index 7d12f54..49530c4 100644
--- a/ThreadPool/test/TestThreadPool.cpp
+++ b/ThreadPool/test/TestThreadPool.cpp
@@ -42,7 +42,7 @@ public:
         mDone.notify_one();
     }
 
-    void queueWorkAdded(const PoolPtr&, int count, bool wasEmpty)
+    void queueWorkAdded(const PoolPtr&, Ice::Long count, bool wasEmpty)
     {
         boost::lock_guard<boost::mutex> lock(mLock);
         mTasks = count;
diff --git a/WorkQueue/include/AsteriskSCF/DefaultQueueListener.h b/WorkQueue/include/AsteriskSCF/DefaultQueueListener.h
index 9cf9f9c..01b4090 100644
--- a/WorkQueue/include/AsteriskSCF/DefaultQueueListener.h
+++ b/WorkQueue/include/AsteriskSCF/DefaultQueueListener.h
@@ -45,7 +45,7 @@ class ASTERISK_SCF_ICEBOX_EXPORT DefaultQueueListener : public AsteriskSCF::Syst
 public:
     DefaultQueueListener(const AsteriskSCF::System::WorkQueue::V1::QueuePtr& queue);
     ~DefaultQueueListener();
-    void workAdded(int numNewWork, bool wasEmpty);
+    void workAdded(Ice::Long numNewWork, bool wasEmpty);
     void workResumable();
     void emptied();
 private:
diff --git a/WorkQueue/include/AsteriskSCF/SuspendableWorkQueue.h b/WorkQueue/include/AsteriskSCF/SuspendableWorkQueue.h
index cb2b292..d2b79be 100644
--- a/WorkQueue/include/AsteriskSCF/SuspendableWorkQueue.h
+++ b/WorkQueue/include/AsteriskSCF/SuspendableWorkQueue.h
@@ -39,7 +39,7 @@ public:
      * Return value indicates if there is more work that can be handled immediately.
      */
     bool executeWork();
-    int getSize();
+    Ice::Long getSize();
     void setListener(const AsteriskSCF::System::WorkQueue::V1::QueueListenerPtr& listener);
 private:
     boost::shared_ptr<SuspendableWorkQueuePriv> mPriv;
diff --git a/WorkQueue/include/AsteriskSCF/WorkQueue.h b/WorkQueue/include/AsteriskSCF/WorkQueue.h
index 5544c96..0365537 100644
--- a/WorkQueue/include/AsteriskSCF/WorkQueue.h
+++ b/WorkQueue/include/AsteriskSCF/WorkQueue.h
@@ -38,7 +38,7 @@ public:
      * Return value indicates if there is more work that can be executed immediately.
      */
     bool executeWork();
-    int getSize();
+    Ice::Long getSize();
     void setListener(const AsteriskSCF::System::WorkQueue::V1::QueueListenerPtr& listener);
 private:
     boost::shared_ptr<WorkQueuePriv> mPriv;
diff --git a/WorkQueue/src/DefaultQueueListener.cpp b/WorkQueue/src/DefaultQueueListener.cpp
index 27d9536..9a55341 100644
--- a/WorkQueue/src/DefaultQueueListener.cpp
+++ b/WorkQueue/src/DefaultQueueListener.cpp
@@ -86,7 +86,7 @@ DefaultQueueListener::~DefaultQueueListener()
     mPriv->mThread.join();
 }
 
-void DefaultQueueListener::workAdded(int, bool wasEmpty)
+void DefaultQueueListener::workAdded(Ice::Long, bool wasEmpty)
 {
     if (wasEmpty)
     {
diff --git a/WorkQueue/src/SuspendableWorkQueue.cpp b/WorkQueue/src/SuspendableWorkQueue.cpp
index 4dfd788..9ebd078 100644
--- a/WorkQueue/src/SuspendableWorkQueue.cpp
+++ b/WorkQueue/src/SuspendableWorkQueue.cpp
@@ -46,7 +46,7 @@ public:
     /**
      * mLock is expected to be held when this function is called
      */
-    int getSize()
+    Ice::Long getSize()
     {
         return mQueue.size() + (currentWork == 0 ? 0 : 1);
     }
@@ -354,7 +354,7 @@ bool SuspendableWorkQueue::executeWork()
     return true;
 }
 
-int SuspendableWorkQueue::getSize()
+Ice::Long SuspendableWorkQueue::getSize()
 {
     boost::shared_lock<boost::shared_mutex> lock(mPriv->mLock);
     return mPriv->getSize();
diff --git a/WorkQueue/src/WorkQueue.cpp b/WorkQueue/src/WorkQueue.cpp
index 6b2a6c1..abec3b0 100644
--- a/WorkQueue/src/WorkQueue.cpp
+++ b/WorkQueue/src/WorkQueue.cpp
@@ -97,7 +97,7 @@ void WorkQueue::enqueueWorkSeq(const WorkSeq& works)
 
     if (listenerRef != 0)
     {
-        listenerRef->workAdded(works.size(), wasEmpty);
+        listenerRef->workAdded(static_cast<long>(works.size()), wasEmpty);
     }
 }
 
@@ -153,10 +153,10 @@ bool WorkQueue::executeWork()
     return true;
 }
 
-int WorkQueue::getSize()
+Ice::Long WorkQueue::getSize()
 {
     boost::shared_lock<boost::shared_mutex> lock(mPriv->mLock);
-    return mPriv->mQueue.size();
+    return static_cast<long>(mPriv->mQueue.size());
 }
 
 void WorkQueue::setListener(const QueueListenerPtr& listener)
diff --git a/WorkQueue/test/TestSuspendableWorkQueue.cpp b/WorkQueue/test/TestSuspendableWorkQueue.cpp
index 47ab140..9894193 100644
--- a/WorkQueue/test/TestSuspendableWorkQueue.cpp
+++ b/WorkQueue/test/TestSuspendableWorkQueue.cpp
@@ -31,7 +31,7 @@ public:
         emptyNotice(false),
         resumableNotice(false) { }
 
-    void workAdded(int, bool wasEmpty)
+    void workAdded(Ice::Long, bool wasEmpty)
     {
         addedNotice = true;
         addedEmptyNotice = wasEmpty;
diff --git a/WorkQueue/test/TestWorkQueue.cpp b/WorkQueue/test/TestWorkQueue.cpp
index 0ff5ed7..b0d6b0d 100644
--- a/WorkQueue/test/TestWorkQueue.cpp
+++ b/WorkQueue/test/TestWorkQueue.cpp
@@ -31,7 +31,7 @@ public:
         addedEmptyNotice(false),
         emptyNotice(false) { }
 
-    void workAdded(int numNewWork, bool wasEmpty)
+    void workAdded(Ice::Long numNewWork, bool wasEmpty)
     {
         addedNotice = true;
         addedEmptyNotice = wasEmpty;

-----------------------------------------------------------------------


-- 
asterisk-scf/release/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list