enable verbose-repository in non-debug

This commit is contained in:
Darren Ranalli 2006-11-30 02:35:13 +00:00
parent 4e4b15e7e2
commit ed32a262f4
3 changed files with 0 additions and 16 deletions

View File

@ -249,7 +249,6 @@ get_simulated_disconnect() const {
return _simulated_disconnect; return _simulated_disconnect;
} }
#ifndef NDEBUG
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: CConnectionRepository::toggle_verbose // Function: CConnectionRepository::toggle_verbose
// Access: Published // Access: Published
@ -261,9 +260,7 @@ INLINE void CConnectionRepository::
toggle_verbose() { toggle_verbose() {
_verbose = !_verbose; _verbose = !_verbose;
} }
#endif // NDEBUG
#ifndef NDEBUG
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: CConnectionRepository::set_verbose // Function: CConnectionRepository::set_verbose
// Access: Published // Access: Published
@ -275,9 +272,7 @@ INLINE void CConnectionRepository::
set_verbose(bool verbose) { set_verbose(bool verbose) {
_verbose = verbose; _verbose = verbose;
} }
#endif // NDEBUG
#ifndef NDEBUG
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: CConnectionRepository::get_verbose // Function: CConnectionRepository::get_verbose
// Access: Published // Access: Published
@ -289,4 +284,3 @@ INLINE bool CConnectionRepository::
get_verbose() const { get_verbose() const {
return _verbose; return _verbose;
} }
#endif // NDEBUG

View File

@ -235,11 +235,9 @@ check_datagram() {
_bdc.Flush(); _bdc.Flush();
#endif //WANT_NATIVE_NET #endif //WANT_NATIVE_NET
while (do_check_datagram()) { //Read a datagram while (do_check_datagram()) { //Read a datagram
#ifndef NDEBUG
if (get_verbose()) { if (get_verbose()) {
describe_message(nout, "receive ", _dg.get_message()); describe_message(nout, "receive ", _dg.get_message());
} }
#endif // NDEBUG
// Start breaking apart the datagram. // Start breaking apart the datagram.
_di = DatagramIterator(_dg); _di = DatagramIterator(_dg);
@ -362,11 +360,9 @@ send_datagram(const Datagram &dg) {
return false; return false;
} }
#ifndef NDEBUG
if (get_verbose()) { if (get_verbose()) {
describe_message(nout, "send ", dg.get_message()); describe_message(nout, "send ", dg.get_message());
} }
#endif // NDEBUG
#ifdef WANT_NATIVE_NET #ifdef WANT_NATIVE_NET
if(_native) if(_native)
@ -698,7 +694,6 @@ handle_update_field_owner() {
return true; return true;
} }
#ifndef NDEBUG
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: CConnectionRepository::describe_message // Function: CConnectionRepository::describe_message
// Access: Private // Access: Private
@ -793,5 +788,4 @@ describe_message(ostream &out, const string &prefix,
} }
} }
} }
#endif // NDEBUG

View File

@ -120,21 +120,17 @@ PUBLISHED:
INLINE void set_simulated_disconnect(bool simulated_disconnect); INLINE void set_simulated_disconnect(bool simulated_disconnect);
INLINE bool get_simulated_disconnect() const; INLINE bool get_simulated_disconnect() const;
#ifndef NDEBUG
INLINE void toggle_verbose(); INLINE void toggle_verbose();
INLINE void set_verbose(bool verbose); INLINE void set_verbose(bool verbose);
INLINE bool get_verbose() const; INLINE bool get_verbose() const;
#endif // NDEBUG
private: private:
bool do_check_datagram(); bool do_check_datagram();
bool handle_update_field(); bool handle_update_field();
bool handle_update_field_owner(); bool handle_update_field_owner();
#ifndef NDEBUG
void describe_message(ostream &out, const string &prefix, void describe_message(ostream &out, const string &prefix,
const string &message_data) const; const string &message_data) const;
#endif // NDEBUG
#ifdef HAVE_PYTHON #ifdef HAVE_PYTHON
PyObject *_python_repository; PyObject *_python_repository;