From 05425ddd3499256a4e503bb1f94132b8d3f872aa Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 17 Jan 2003 17:43:03 +0000 Subject: [PATCH] build for gcc3.2 --- pandatool/src/eggbase/eggWriter.cxx | 5 ++++- pandatool/src/eggbase/somethingToEgg.cxx | 5 ++++- pandatool/src/imagebase/imageWriter.cxx | 5 ++++- pandatool/src/lwo/iffInputFile.cxx | 4 ++-- pandatool/src/lwo/iffInputFile.h | 6 +++--- pandatool/src/lwo/lwoDiscontinuousVertexMap.cxx | 12 ++++++++---- pandatool/src/progbase/programBase.cxx | 5 ++++- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/pandatool/src/eggbase/eggWriter.cxx b/pandatool/src/eggbase/eggWriter.cxx index ef3573e17c..d22db396c5 100644 --- a/pandatool/src/eggbase/eggWriter.cxx +++ b/pandatool/src/eggbase/eggWriter.cxx @@ -274,7 +274,10 @@ handle_args(ProgramBase::Args &args) { if (!args.empty()) { nout << "Unexpected arguments on command line:\n"; - copy(args.begin(), args.end(), ostream_iterator(nout, " ")); + Args::const_iterator ai; + for (ai = args.begin(); ai != args.end(); ++ai) { + nout << (*ai) << " "; + } nout << "\r"; return false; } diff --git a/pandatool/src/eggbase/somethingToEgg.cxx b/pandatool/src/eggbase/somethingToEgg.cxx index ebd2dc856b..1a684ac81f 100644 --- a/pandatool/src/eggbase/somethingToEgg.cxx +++ b/pandatool/src/eggbase/somethingToEgg.cxx @@ -280,7 +280,10 @@ handle_args(Args &args) { nout << "You may only specify one " << _format_name << " file to read on the command line. " << "You specified: "; - copy(args.begin(), args.end(), ostream_iterator(nout, " ")); + Args::const_iterator ai; + for (ai = args.begin(); ai != args.end(); ++ai) { + nout << (*ai) << " "; + } nout << "\n"; return false; } diff --git a/pandatool/src/imagebase/imageWriter.cxx b/pandatool/src/imagebase/imageWriter.cxx index 1e474a52f9..ac0d40a38c 100644 --- a/pandatool/src/imagebase/imageWriter.cxx +++ b/pandatool/src/imagebase/imageWriter.cxx @@ -113,7 +113,10 @@ handle_args(ProgramBase::Args &args) { } else { if (!args.empty()) { nout << "Unexpected arguments on command line:\n"; - copy(args.begin(), args.end(), ostream_iterator(nout, " ")); + Args::const_iterator ai; + for (ai = args.begin(); ai != args.end(); ++ai) { + nout << (*ai) << " "; + } nout << "\r"; return false; } diff --git a/pandatool/src/lwo/iffInputFile.cxx b/pandatool/src/lwo/iffInputFile.cxx index 20e48bf54f..2a38ee51dd 100644 --- a/pandatool/src/lwo/iffInputFile.cxx +++ b/pandatool/src/lwo/iffInputFile.cxx @@ -362,7 +362,7 @@ read_byte(char &byte) { // false otherwise. //////////////////////////////////////////////////////////////////// bool IffInputFile:: -read_bytes(Datagram &datagram, size_t length) { +read_bytes(Datagram &datagram, int length) { if (is_eof()) { return false; } @@ -387,7 +387,7 @@ read_bytes(Datagram &datagram, size_t length) { // Returns true if successful, false otherwise. //////////////////////////////////////////////////////////////////// bool IffInputFile:: -skip_bytes(size_t length) { +skip_bytes(int length) { if (is_eof()) { return false; } diff --git a/pandatool/src/lwo/iffInputFile.h b/pandatool/src/lwo/iffInputFile.h index a398e707a5..8407eefdca 100644 --- a/pandatool/src/lwo/iffInputFile.h +++ b/pandatool/src/lwo/iffInputFile.h @@ -67,8 +67,8 @@ public: PT(IffChunk) get_subchunk(IffChunk *context); bool read_byte(char &byte); - bool read_bytes(Datagram &datagram, size_t length); - bool skip_bytes(size_t length); + bool read_bytes(Datagram &datagram, int length); + bool skip_bytes(int length); protected: virtual IffChunk *make_new_chunk(IffId id); @@ -97,7 +97,7 @@ public: private: static TypeHandle _type_handle; - friend IffChunk; + friend class IffChunk; }; #include "iffInputFile.I" diff --git a/pandatool/src/lwo/lwoDiscontinuousVertexMap.cxx b/pandatool/src/lwo/lwoDiscontinuousVertexMap.cxx index 77f088f3e6..ff493ebc5f 100644 --- a/pandatool/src/lwo/lwoDiscontinuousVertexMap.cxx +++ b/pandatool/src/lwo/lwoDiscontinuousVertexMap.cxx @@ -108,11 +108,15 @@ read_iff(IffInputFile *in, size_t stop_at) { << " of polygon " << polygon_index << " specified by discontinuous vertex map.\n" << "Original value = "; - copy(orig_value.begin(), orig_value.end(), - ostream_iterator(nout, " ")); + + PTA_float::const_iterator vi; + for (vi = orig_value.begin(); vi != orig_value.end(); ++vi) { + nout << (*vi) << " "; + } nout << " new value = "; - copy(value.begin(), value.end(), - ostream_iterator(nout, " ")); + for (vi = value.begin(); vi != value.end(); ++vi) { + nout << (*vi) << " "; + } nout << "\n"; } } diff --git a/pandatool/src/progbase/programBase.cxx b/pandatool/src/progbase/programBase.cxx index 79d6bcd2b1..1ee054a458 100644 --- a/pandatool/src/progbase/programBase.cxx +++ b/pandatool/src/progbase/programBase.cxx @@ -407,7 +407,10 @@ bool ProgramBase:: handle_args(ProgramBase::Args &args) { if (!args.empty()) { nout << "Unexpected arguments on command line:\n"; - copy(args.begin(), args.end(), ostream_iterator(nout, " ")); + Args::const_iterator ai; + for (ai = args.begin(); ai != args.end(); ++ai) { + nout << (*ai) << " "; + } nout << "\r"; return false; }