Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: webrtc/base/sigslot.h

Issue 1429513004: Switch usage of _DEBUG macro to NDEBUG. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: REBASE Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/stringutils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // sigslot.h: Signal/Slot classes 1 // sigslot.h: Signal/Slot classes
2 // 2 //
3 // Written by Sarah Thompson (sarah@telergy.com) 2002. 3 // Written by Sarah Thompson (sarah@telergy.com) 2002.
4 // 4 //
5 // License: Public domain. You are free to use this code however you like, with the proviso that 5 // License: Public domain. You are free to use this code however you like, with the proviso that
6 // the author takes on no responsibility or liability for any use. 6 // the author takes on no responsibility or liability for any use.
7 // 7 //
8 // QUICK DOCUMENTATION 8 // QUICK DOCUMENTATION
9 // 9 //
10 // (see also the full documentation at http://sigsl ot.sourceforge.net/) 10 // (see also the full documentation at http://sigsl ot.sourceforge.net/)
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 { 525 {
526 (*it)->getdest()->signal_disconnect(this); 526 (*it)->getdest()->signal_disconnect(this);
527 delete *it; 527 delete *it;
528 528
529 ++it; 529 ++it;
530 } 530 }
531 531
532 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 532 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
533 } 533 }
534 534
535 #ifdef _DEBUG 535 #if !defined(NDEBUG)
536 bool connected(has_slots_interface* pclass) 536 bool connected(has_slots_interface* pclass)
537 { 537 {
538 lock_block<mt_policy> lock(this); 538 lock_block<mt_policy> lock(this);
539 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 539 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
540 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 540 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
541 while(it != itEnd) 541 while(it != itEnd)
542 { 542 {
543 itNext = it; 543 itNext = it;
544 ++itNext; 544 ++itNext;
545 if ((*it)->getdest() == pclass) 545 if ((*it)->getdest() == pclass)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 { 679 {
680 (*it)->getdest()->signal_disconnect(this); 680 (*it)->getdest()->signal_disconnect(this);
681 delete *it; 681 delete *it;
682 682
683 ++it; 683 ++it;
684 } 684 }
685 685
686 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 686 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
687 } 687 }
688 688
689 #ifdef _DEBUG 689 #if !defined(NDEBUG)
690 bool connected(has_slots_interface* pclass) 690 bool connected(has_slots_interface* pclass)
691 { 691 {
692 lock_block<mt_policy> lock(this); 692 lock_block<mt_policy> lock(this);
693 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 693 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
694 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 694 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
695 while(it != itEnd) 695 while(it != itEnd)
696 { 696 {
697 itNext = it; 697 itNext = it;
698 ++itNext; 698 ++itNext;
699 if ((*it)->getdest() == pclass) 699 if ((*it)->getdest() == pclass)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 { 818 {
819 (*it)->getdest()->signal_disconnect(this); 819 (*it)->getdest()->signal_disconnect(this);
820 delete *it; 820 delete *it;
821 821
822 ++it; 822 ++it;
823 } 823 }
824 824
825 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 825 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
826 } 826 }
827 827
828 #ifdef _DEBUG 828 #if !defined(NDEBUG)
829 bool connected(has_slots_interface* pclass) 829 bool connected(has_slots_interface* pclass)
830 { 830 {
831 lock_block<mt_policy> lock(this); 831 lock_block<mt_policy> lock(this);
832 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 832 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
833 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 833 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
834 while(it != itEnd) 834 while(it != itEnd)
835 { 835 {
836 itNext = it; 836 itNext = it;
837 ++itNext; 837 ++itNext;
838 if ((*it)->getdest() == pclass) 838 if ((*it)->getdest() == pclass)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 { 956 {
957 (*it)->getdest()->signal_disconnect(this); 957 (*it)->getdest()->signal_disconnect(this);
958 delete *it; 958 delete *it;
959 959
960 ++it; 960 ++it;
961 } 961 }
962 962
963 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 963 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
964 } 964 }
965 965
966 #ifdef _DEBUG 966 #if !defined(NDEBUG)
967 bool connected(has_slots_interface* pclass) 967 bool connected(has_slots_interface* pclass)
968 { 968 {
969 lock_block<mt_policy> lock(this); 969 lock_block<mt_policy> lock(this);
970 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 970 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
971 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 971 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
972 while(it != itEnd) 972 while(it != itEnd)
973 { 973 {
974 itNext = it; 974 itNext = it;
975 ++itNext; 975 ++itNext;
976 if ((*it)->getdest() == pclass) 976 if ((*it)->getdest() == pclass)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 { 1094 {
1095 (*it)->getdest()->signal_disconnect(this); 1095 (*it)->getdest()->signal_disconnect(this);
1096 delete *it; 1096 delete *it;
1097 1097
1098 ++it; 1098 ++it;
1099 } 1099 }
1100 1100
1101 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 1101 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
1102 } 1102 }
1103 1103
1104 #ifdef _DEBUG 1104 #if !defined(NDEBUG)
1105 bool connected(has_slots_interface* pclass) 1105 bool connected(has_slots_interface* pclass)
1106 { 1106 {
1107 lock_block<mt_policy> lock(this); 1107 lock_block<mt_policy> lock(this);
1108 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 1108 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
1109 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 1109 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
1110 while(it != itEnd) 1110 while(it != itEnd)
1111 { 1111 {
1112 itNext = it; 1112 itNext = it;
1113 ++itNext; 1113 ++itNext;
1114 if ((*it)->getdest() == pclass) 1114 if ((*it)->getdest() == pclass)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 { 1234 {
1235 (*it)->getdest()->signal_disconnect(this); 1235 (*it)->getdest()->signal_disconnect(this);
1236 delete *it; 1236 delete *it;
1237 1237
1238 ++it; 1238 ++it;
1239 } 1239 }
1240 1240
1241 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 1241 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
1242 } 1242 }
1243 1243
1244 #ifdef _DEBUG 1244 #if !defined(NDEBUG)
1245 bool connected(has_slots_interface* pclass) 1245 bool connected(has_slots_interface* pclass)
1246 { 1246 {
1247 lock_block<mt_policy> lock(this); 1247 lock_block<mt_policy> lock(this);
1248 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 1248 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
1249 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 1249 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
1250 while(it != itEnd) 1250 while(it != itEnd)
1251 { 1251 {
1252 itNext = it; 1252 itNext = it;
1253 ++itNext; 1253 ++itNext;
1254 if ((*it)->getdest() == pclass) 1254 if ((*it)->getdest() == pclass)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 { 1374 {
1375 (*it)->getdest()->signal_disconnect(this); 1375 (*it)->getdest()->signal_disconnect(this);
1376 delete *it; 1376 delete *it;
1377 1377
1378 ++it; 1378 ++it;
1379 } 1379 }
1380 1380
1381 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 1381 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
1382 } 1382 }
1383 1383
1384 #ifdef _DEBUG 1384 #if !defined(NDEBUG)
1385 bool connected(has_slots_interface* pclass) 1385 bool connected(has_slots_interface* pclass)
1386 { 1386 {
1387 lock_block<mt_policy> lock(this); 1387 lock_block<mt_policy> lock(this);
1388 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 1388 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
1389 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 1389 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
1390 while(it != itEnd) 1390 while(it != itEnd)
1391 { 1391 {
1392 itNext = it; 1392 itNext = it;
1393 ++itNext; 1393 ++itNext;
1394 if ((*it)->getdest() == pclass) 1394 if ((*it)->getdest() == pclass)
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 { 1514 {
1515 (*it)->getdest()->signal_disconnect(this); 1515 (*it)->getdest()->signal_disconnect(this);
1516 delete *it; 1516 delete *it;
1517 1517
1518 ++it; 1518 ++it;
1519 } 1519 }
1520 1520
1521 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 1521 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
1522 } 1522 }
1523 1523
1524 #ifdef _DEBUG 1524 #if !defined(NDEBUG)
1525 bool connected(has_slots_interface* pclass) 1525 bool connected(has_slots_interface* pclass)
1526 { 1526 {
1527 lock_block<mt_policy> lock(this); 1527 lock_block<mt_policy> lock(this);
1528 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 1528 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
1529 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 1529 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
1530 while(it != itEnd) 1530 while(it != itEnd)
1531 { 1531 {
1532 itNext = it; 1532 itNext = it;
1533 ++itNext; 1533 ++itNext;
1534 if ((*it)->getdest() == pclass) 1534 if ((*it)->getdest() == pclass)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 { 1655 {
1656 (*it)->getdest()->signal_disconnect(this); 1656 (*it)->getdest()->signal_disconnect(this);
1657 delete *it; 1657 delete *it;
1658 1658
1659 ++it; 1659 ++it;
1660 } 1660 }
1661 1661
1662 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end()); 1662 m_connected_slots.erase(m_connected_slots.begin(), m_con nected_slots.end());
1663 } 1663 }
1664 1664
1665 #ifdef _DEBUG 1665 #if !defined(NDEBUG)
1666 bool connected(has_slots_interface* pclass) 1666 bool connected(has_slots_interface* pclass)
1667 { 1667 {
1668 lock_block<mt_policy> lock(this); 1668 lock_block<mt_policy> lock(this);
1669 typename connections_list::const_iterator itNext, it = m _connected_slots.begin(); 1669 typename connections_list::const_iterator itNext, it = m _connected_slots.begin();
1670 typename connections_list::const_iterator itEnd = m_conn ected_slots.end(); 1670 typename connections_list::const_iterator itEnd = m_conn ected_slots.end();
1671 while(it != itEnd) 1671 while(it != itEnd)
1672 { 1672 {
1673 itNext = it; 1673 itNext = it;
1674 ++itNext; 1674 ++itNext;
1675 if ((*it)->getdest() == pclass) 1675 if ((*it)->getdest() == pclass)
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); 2795 (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8);
2796 2796
2797 it = itNext; 2797 it = itNext;
2798 } 2798 }
2799 } 2799 }
2800 }; 2800 };
2801 2801
2802 }; // namespace sigslot 2802 }; // namespace sigslot
2803 2803
2804 #endif // WEBRTC_BASE_SIGSLOT_H__ 2804 #endif // WEBRTC_BASE_SIGSLOT_H__
OLDNEW
« no previous file with comments | « webrtc/base/physicalsocketserver.cc ('k') | webrtc/base/stringutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698