patches/songbird-01-cpp-template.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 18110 93461edb1490
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18110
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     1
Index: Songbird1.1/components/mediacore/gstreamer/src/sbGStreamerMediacore.cpp
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     2
===================================================================
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     3
--- Songbird1.1/components/mediacore/gstreamer/src/sbGStreamerMediacore.cpp	(revision 13119)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     4
+++ Songbird1.1/components/mediacore/gstreamer/src/sbGStreamerMediacore.cpp	(working copy)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     5
@@ -454,7 +454,7 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     6
   /* Add each filter, followed by an audioconvert. The first-added filter ends
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     7
    * last in the pipeline, so we iterate in reverse.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     8
    */
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     9
-  std::vector<GstElement *>::const_reverse_iterator it = mAudioFilters.rbegin(),
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    10
+  std::vector<GstElement *>::reverse_iterator it = mAudioFilters.rbegin(),
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    11
       end = mAudioFilters.rend();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    12
   for ( ; it != end; ++it)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    13
   {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    14
Index: Songbird1.1/components/mediacore/base/src/sbMediacoreVotingChain.cpp
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    15
===================================================================
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    16
--- Songbird1.1/components/mediacore/base/src/sbMediacoreVotingChain.cpp	(revision 13119)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    17
+++ Songbird1.1/components/mediacore/base/src/sbMediacoreVotingChain.cpp	(working copy)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    18
@@ -127,8 +127,8 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    19
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    20
   nsAutoLock lock(mLock);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    21
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    22
-  votingmap_t::const_reverse_iterator cit = mResults.rbegin();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    23
-  votingmap_t::const_reverse_iterator endCit = mResults.rend();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    24
+  votingmap_t::reverse_iterator cit = mResults.rbegin();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    25
+  votingmap_t::reverse_iterator endCit = mResults.rend();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    26
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    27
   for(; cit != endCit; ++cit) {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    28
     rv = mutableArray->AppendElement((*cit).second, PR_FALSE);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    29
@@ -152,8 +152,8 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    30
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    31
   nsAutoLock lock(mLock);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    32
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    33
-  votingmap_t::const_reverse_iterator cit = mResults.rbegin();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    34
-  votingmap_t::const_reverse_iterator endCit = mResults.rend();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    35
+  votingmap_t::reverse_iterator cit = mResults.rbegin();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    36
+  votingmap_t::reverse_iterator endCit = mResults.rend();
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    37
   for(; cit != endCit; ++cit) {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    38
     if((*cit).second == aMediacore) {
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    39
       *_retval = (*cit).first;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    40
Index: Songbird1.1/components/mediacore/manager/src/sbMediacoreShuffleSequenceGenerator.cpp
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    41
===================================================================
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    42
--- Songbird1.1/components/mediacore/manager/src/sbMediacoreShuffleSequenceGenerator.cpp	(revision 13119)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    43
+++ Songbird1.1/components/mediacore/manager/src/sbMediacoreShuffleSequenceGenerator.cpp	(working copy)
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    44
@@ -86,10 +86,10 @@
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    45
   std::srand(std::clock());
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    46
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    47
   // Randomly sample the pool to populate the sequence.
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    48
-  random_shuffle(pool.begin(), pool.end());
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    49
+  std::random_shuffle(pool.begin(), pool.end());
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    50
 
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    51
   // Copy into the return array
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    52
-  copy(pool.begin(), pool.end(), *aSequence);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    53
+  std::copy(pool.begin(), pool.end(), *aSequence);
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    54
   
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    55
   return NS_OK;
93461edb1490 2010-06-10 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    56
 }