Browse Source

vector -> pvector, etc.

David Rose 24 years ago
parent
commit
3794654986

+ 2 - 2
pandatool/src/bam/bamInfo.cxx

@@ -23,7 +23,7 @@
 #include <renderRelation.h>
 #include <renderRelation.h>
 #include <geomNode.h>
 #include <geomNode.h>
 
 
-#include <vector>
+#include "pvector.h"
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 //     Function: BamInfo::Constructor
 //     Function: BamInfo::Constructor
@@ -126,7 +126,7 @@ get_info(const Filename &filename) {
   nout << filename << " : Bam version " << bam_file.get_file_major_ver()
   nout << filename << " : Bam version " << bam_file.get_file_major_ver()
        << "." << bam_file.get_file_minor_ver() << "\n";
        << "." << bam_file.get_file_minor_ver() << "\n";
 
 
-  typedef vector<TypedWritable *> Objects;
+  typedef pvector<TypedWritable *> Objects;
   Objects objects;
   Objects objects;
   TypedWritable *object = bam_file.read_object();
   TypedWritable *object = bam_file.read_object();
   while (object != (TypedWritable *)NULL || !bam_file.is_eof()) {
   while (object != (TypedWritable *)NULL || !bam_file.is_eof()) {

+ 1 - 1
pandatool/src/egg-palettize/eggFile.cxx

@@ -127,7 +127,7 @@ scan_textures() {
 //               appended to the existing set.
 //               appended to the existing set.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void EggFile::
 void EggFile::
-get_textures(set<TextureImage *> &result) const {
+get_textures(pset<TextureImage *> &result) const {
   Textures::const_iterator ti;
   Textures::const_iterator ti;
   for (ti = _textures.begin(); ti != _textures.end(); ++ti) {
   for (ti = _textures.begin(); ti != _textures.end(); ++ti) {
     result.insert((*ti)->get_texture());
     result.insert((*ti)->get_texture());

+ 3 - 3
pandatool/src/egg-palettize/paletteGroup.cxx

@@ -132,7 +132,7 @@ get_groups() const {
 //               the vector first.
 //               the vector first.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void PaletteGroup::
 void PaletteGroup::
-get_placements(vector<TexturePlacement *> &placements) const {
+get_placements(pvector<TexturePlacement *> &placements) const {
   Placements::const_iterator pi;
   Placements::const_iterator pi;
   for (pi = _placements.begin(); pi != _placements.end(); ++pi) {
   for (pi = _placements.begin(); pi != _placements.end(); ++pi) {
     placements.push_back(*pi);
     placements.push_back(*pi);
@@ -147,7 +147,7 @@ get_placements(vector<TexturePlacement *> &placements) const {
 //               vector.  See get_placements().
 //               vector.  See get_placements().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void PaletteGroup::
 void PaletteGroup::
-get_complete_placements(vector<TexturePlacement *> &placements) const {
+get_complete_placements(pvector<TexturePlacement *> &placements) const {
   PaletteGroups complete;
   PaletteGroups complete;
   complete.make_complete(_dependent);
   complete.make_complete(_dependent);
 
 
@@ -671,7 +671,7 @@ complete_pointers(vector_typedWritable &p_list, BamReader *manager) {
 void PaletteGroup::
 void PaletteGroup::
 finalize() {
 finalize() {
   // Now we can copy the pages into the actual map.
   // Now we can copy the pages into the actual map.
-  vector<PalettePage *>::const_iterator pi;
+  pvector<PalettePage *>::const_iterator pi;
   for (pi = _load_pages.begin(); pi != _load_pages.end(); ++pi) {
   for (pi = _load_pages.begin(); pi != _load_pages.end(); ++pi) {
     PalettePage *page = (*pi);
     PalettePage *page = (*pi);
     bool inserted = _pages.
     bool inserted = _pages.

+ 4 - 4
pandatool/src/egg-palettize/palettizer.cxx

@@ -191,7 +191,7 @@ report_pi() const {
 
 
   // Sort the palette groups into order of preference, so that the
   // Sort the palette groups into order of preference, so that the
   // more specific ones appear at the bottom.
   // more specific ones appear at the bottom.
-  vector<PaletteGroup *> sorted_groups;
+  pvector<PaletteGroup *> sorted_groups;
   Groups::const_iterator gi;
   Groups::const_iterator gi;
   for (gi = _groups.begin(); gi != _groups.end(); ++gi) {
   for (gi = _groups.begin(); gi != _groups.end(); ++gi) {
     sorted_groups.push_back((*gi).second);
     sorted_groups.push_back((*gi).second);
@@ -200,7 +200,7 @@ report_pi() const {
        SortGroupsByPreference());
        SortGroupsByPreference());
 
 
   cout << "\npalette groups\n";
   cout << "\npalette groups\n";
-  vector<PaletteGroup *>::iterator si;
+  pvector<PaletteGroup *>::iterator si;
   for (si = sorted_groups.begin(); si != sorted_groups.end(); ++si) {
   for (si = sorted_groups.begin(); si != sorted_groups.end(); ++si) {
     PaletteGroup *group = (*si);
     PaletteGroup *group = (*si);
     if (si != sorted_groups.begin()) {
     if (si != sorted_groups.begin()) {
@@ -245,7 +245,7 @@ void Palettizer::
 report_statistics() const {
 report_statistics() const {
   // Sort the groups into order by dependency order, for the user's
   // Sort the groups into order by dependency order, for the user's
   // convenience.
   // convenience.
-  vector<PaletteGroup *> sorted_groups;
+  pvector<PaletteGroup *> sorted_groups;
 
 
   Groups::const_iterator gi;
   Groups::const_iterator gi;
   for (gi = _groups.begin(); gi != _groups.end(); ++gi) {
   for (gi = _groups.begin(); gi != _groups.end(); ++gi) {
@@ -257,7 +257,7 @@ report_statistics() const {
 
 
   Placements overall_placements;
   Placements overall_placements;
 
 
-  vector<PaletteGroup *>::const_iterator si;
+  pvector<PaletteGroup *>::const_iterator si;
   for (si = sorted_groups.begin();
   for (si = sorted_groups.begin();
        si != sorted_groups.end();
        si != sorted_groups.end();
        ++si) {
        ++si) {

+ 1 - 1
pandatool/src/egg-palettize/txaLine.cxx

@@ -119,7 +119,7 @@ parse(const string &line) {
 
 
       } else {
       } else {
         // Collect a number of consecutive numeric fields.
         // Collect a number of consecutive numeric fields.
-        vector<int> numbers;
+        pvector<int> numbers;
         while (wi != words.end() && isdigit((*wi)[0])) {
         while (wi != words.end() && isdigit((*wi)[0])) {
           const string &word = *wi;
           const string &word = *wi;
           int num;
           int num;

+ 1 - 1
pandatool/src/fltegg/fltToEggConverter.cxx

@@ -372,7 +372,7 @@ convert_face(const FltFace *flt_face, FltToEggLevelState &state) {
   }
   }
 
 
   // Collect the vertices for this primitive.
   // Collect the vertices for this primitive.
-  vector< PT_EggVertex > vertices;
+  pvector< PT_EggVertex > vertices;
 
 
   const FltVertexList *vlist = (FltVertexList *)NULL;
   const FltVertexList *vlist = (FltVertexList *)NULL;
   int num_children = flt_face->get_num_children();
   int num_children = flt_face->get_num_children();

+ 2 - 2
pandatool/src/gtk-stats/gtkStatsStripWindow.cxx

@@ -83,7 +83,7 @@ new_collector() {
   // Determine the set of collectors that display level data.  We'll
   // Determine the set of collectors that display level data.  We'll
   // want to put these on the "Levels" pull-down menu.
   // want to put these on the "Levels" pull-down menu.
 
 
-  set<int> levels;
+  pset<int> levels;
 
 
   int num_collectors = client_data->get_num_collectors();
   int num_collectors = client_data->get_num_collectors();
   for (int i = 0; i < num_collectors; i++) {
   for (int i = 0; i < num_collectors; i++) {
@@ -109,7 +109,7 @@ new_collector() {
 
 
   // Now put the collectors we found on the menu.
   // Now put the collectors we found on the menu.
   _levels_menu->items().clear();
   _levels_menu->items().clear();
-  set<int>::const_iterator li;
+  pset<int>::const_iterator li;
   for (li = levels.begin(); li != levels.end(); ++li) {
   for (li = levels.begin(); li != levels.end(); ++li) {
     int collector_index = (*li);
     int collector_index = (*li);
     _levels_menu->items().push_back
     _levels_menu->items().push_back

+ 1 - 1
pandatool/src/maya/mayaShader.cxx

@@ -201,7 +201,7 @@ read_surface_color(MObject color) {
     } else {
     } else {
       // If we don't have a heavy verbose count, only report each type
       // If we don't have a heavy verbose count, only report each type
       // of unsupportted shader once.
       // of unsupportted shader once.
-      static set<MFn::Type> bad_types;
+      static pset<MFn::Type> bad_types;
       if (bad_types.insert(color.apiType()).second) {
       if (bad_types.insert(color.apiType()).second) {
         if (verbose == 1) {
         if (verbose == 1) {
           nout << "\n";
           nout << "\n";

+ 2 - 2
pandatool/src/progbase/programBase.cxx

@@ -211,13 +211,13 @@ parse_command_line(int argc, char *argv[]) {
 
 
   // Build up the long options list and the short options string for
   // Build up the long options list and the short options string for
   // getopt_long_only().
   // getopt_long_only().
-  vector<struct option> long_options;
+  pvector<struct option> long_options;
   string short_options;
   string short_options;
 
 
   // We also need to build a temporary map of int index numbers to
   // We also need to build a temporary map of int index numbers to
   // Option pointers.  We'll pass these index numbers to GNU's
   // Option pointers.  We'll pass these index numbers to GNU's
   // getopt_long() so we can tell one option from another.
   // getopt_long() so we can tell one option from another.
-  typedef map<int, const Option *> Options;
+  typedef pmap<int, const Option *> Options;
   Options options;
   Options options;
 
 
   OptionsByName::const_iterator oi;
   OptionsByName::const_iterator oi;

+ 5 - 5
pandatool/src/pstatserver/pStatView.cxx

@@ -23,7 +23,7 @@
 #include <vector_int.h>
 #include <vector_int.h>
 
 
 #include <algorithm>
 #include <algorithm>
-#include <list>
+#include "plist.h"
 
 
 
 
 
 
@@ -36,7 +36,7 @@
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 class FrameSample {
 class FrameSample {
 public:
 public:
-  typedef list<FrameSample *> Started;
+  typedef plist<FrameSample *> Started;
 
 
   FrameSample() {
   FrameSample() {
     _touched = false;
     _touched = false;
@@ -323,7 +323,7 @@ void PStatView::
 update_time_data(const PStatFrameData &frame_data) {
 update_time_data(const PStatFrameData &frame_data) {
   int num_events = frame_data.get_num_events();
   int num_events = frame_data.get_num_events();
 
 
-  typedef vector<FrameSample> Samples;
+  typedef pvector<FrameSample> Samples;
   Samples samples(_client_data->get_num_collectors());
   Samples samples(_client_data->get_num_collectors());
 
 
   FrameSample::Started started;
   FrameSample::Started started;
@@ -332,7 +332,7 @@ update_time_data(const PStatFrameData &frame_data) {
 
 
 
 
   // This tracks the set of samples we actually care about.
   // This tracks the set of samples we actually care about.
-  typedef set<int> GotSamples;
+  typedef pset<int> GotSamples;
   GotSamples got_samples;
   GotSamples got_samples;
 
 
   int i;
   int i;
@@ -432,7 +432,7 @@ update_level_data(const PStatFrameData &frame_data) {
 
 
 
 
   // This tracks the set of level values we got.
   // This tracks the set of level values we got.
-  typedef map<int, float> GotValues;
+  typedef pmap<int, float> GotValues;
   GotValues net_values;
   GotValues net_values;
 
 
   int i;
   int i;

+ 2 - 2
pandatool/src/softprogs/softCVS.cxx

@@ -151,7 +151,7 @@ traverse_subdir(const Filename &directory) {
 
 
   // We need to know the set of files in this directory that are CVS
   // We need to know the set of files in this directory that are CVS
   // elements.
   // elements.
-  set<string> cvs_elements;
+  pset<string> cvs_elements;
   bool in_cvs = false;
   bool in_cvs = false;
   if (!_no_cvs) {
   if (!_no_cvs) {
     in_cvs = scan_cvs(directory, cvs_elements);
     in_cvs = scan_cvs(directory, cvs_elements);
@@ -401,7 +401,7 @@ rename_file(SoftCVS::SceneFiles::iterator begin,
 //               CVS-controlled, false otherwise.
 //               CVS-controlled, false otherwise.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool SoftCVS::
 bool SoftCVS::
-scan_cvs(const string &dirname, set<string> &cvs_elements) {
+scan_cvs(const string &dirname, pset<string> &cvs_elements) {
   Filename cvs_entries = dirname + "/CVS/Entries";
   Filename cvs_entries = dirname + "/CVS/Entries";
   if (!cvs_entries.exists()) {
   if (!cvs_entries.exists()) {
     // Try to CVSify the directory.
     // Try to CVSify the directory.