First step towards eliminating `using namespace std;` (#335)
This commit is contained in:
parent
298147bb39
commit
e0245d2777
|
|
@ -18,8 +18,8 @@
|
|||
#include "cmath.h"
|
||||
#include "lineSegs.h"
|
||||
|
||||
typedef vector<Node *> NodeArray;
|
||||
typedef vector<NodeArray> NavMesh;
|
||||
typedef std::vector<Node *> NodeArray;
|
||||
typedef std::vector<NodeArray> NavMesh;
|
||||
|
||||
Node* find_in_mesh(NavMesh nav_mesh, LVecBase3 pos, int grid_size);
|
||||
|
||||
|
|
@ -32,8 +32,8 @@ class EXPCL_PANDAAI PathFinder {
|
|||
public:
|
||||
Node *_src_node;
|
||||
Node *_dest_node;
|
||||
vector<Node*> _open_list;
|
||||
vector<Node*> _closed_list;
|
||||
std::vector<Node*> _open_list;
|
||||
std::vector<Node*> _closed_list;
|
||||
|
||||
NavMesh _grid;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class EXPCL_PANDAAI AIWorld {
|
|||
AICharPool _ai_char_pool;
|
||||
NodePath _render;
|
||||
public:
|
||||
vector<NodePath> _obstacles;
|
||||
std::vector<NodePath> _obstacles;
|
||||
typedef std::vector<Flock*> FlockPool;
|
||||
FlockPool _flock_pool;
|
||||
void remove_ai_char_from_flock(string name);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void PathFind::create_nav_mesh(const char* navmesh_filename) {
|
|||
string fields[10];
|
||||
|
||||
// Open data file for reading.
|
||||
ifstream nav_mesh_file (navmesh_filename);
|
||||
std::ifstream nav_mesh_file (navmesh_filename);
|
||||
|
||||
if(nav_mesh_file.is_open()) {
|
||||
// Capture the grid size from the file.
|
||||
|
|
@ -56,7 +56,7 @@ void PathFind::create_nav_mesh(const char* navmesh_filename) {
|
|||
|
||||
// Initialize the stage mesh with NULL nodes.
|
||||
for(int r = 0; r < _grid_size; ++r) {
|
||||
_nav_mesh.push_back(vector<Node*>());
|
||||
_nav_mesh.push_back(std::vector<Node*>());
|
||||
for(int c = 0; c < _grid_size; ++c) {
|
||||
_nav_mesh[r].push_back(NULL);
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ void PathFind::create_nav_mesh(const char* navmesh_filename) {
|
|||
* _nav_mesh.
|
||||
*/
|
||||
void PathFind::assign_neighbor_nodes(const char* navmesh_filename){
|
||||
ifstream nav_mesh_file (navmesh_filename);
|
||||
std::ifstream nav_mesh_file (navmesh_filename);
|
||||
|
||||
// Stage variables.
|
||||
int gd_x, gd_y, gd_xn, gd_yn;
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ public:
|
|||
LVecBase3 _prev_position;
|
||||
PT(GeomNode) _parent;
|
||||
LineSegs *_pen;
|
||||
vector<int> _previous_obstacles;
|
||||
std::vector<int> _previous_obstacles;
|
||||
bool _dynamic_avoid;
|
||||
vector<NodePath> _dynamic_obstacle;
|
||||
std::vector<NodePath> _dynamic_obstacle;
|
||||
|
||||
PathFind(AICharacter *ai_ch);
|
||||
~PathFind();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ PUBLISHED:
|
|||
MAKE_PROPERTY(num_commands, get_num_commands);
|
||||
|
||||
protected:
|
||||
queue<GPUCommand> _commands;
|
||||
std::queue<GPUCommand> _commands;
|
||||
};
|
||||
|
||||
#endif // GPUCOMMANDLIST_H
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class PointerSlotStorage {};
|
|||
using std::tr1::array;
|
||||
#else
|
||||
#include <array>
|
||||
using std::array;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ protected:
|
|||
inline LPoint3 get_interpolated_point(CoordinateOrigin origin, float depth);
|
||||
LVecBase3 get_snap_offset(const LMatrix4& mat, size_t resolution);
|
||||
|
||||
vector<NodePath> _cam_nodes;
|
||||
vector<Camera*> _cameras;
|
||||
vector<LVecBase2> _max_film_sizes;
|
||||
std::vector<NodePath> _cam_nodes;
|
||||
std::vector<Camera*> _cameras;
|
||||
std::vector<LVecBase2> _max_film_sizes;
|
||||
|
||||
// Current near and far points
|
||||
// Order: UL, UR, LL, LR (See CoordinateOrigin)
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define INLINE inline
|
||||
#define TYPENAME typename
|
||||
|
||||
|
|
@ -82,7 +80,7 @@ using namespace std;
|
|||
|
||||
// Panda defines a special Filename class. We'll use an ordinary string
|
||||
// instead.
|
||||
typedef string Filename;
|
||||
typedef std::string Filename;
|
||||
|
||||
// Panda defines WORDS_BIGENDIAN on a bigendian machine; otherwise, the
|
||||
// machine is assumed to be littleendian. Outside of Panda, you're
|
||||
|
|
@ -92,15 +90,15 @@ typedef string Filename;
|
|||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#define pvector vector
|
||||
#define pmap map
|
||||
#define pset set
|
||||
#define pvector std::vector
|
||||
#define pmap std::map
|
||||
#define pset std::set
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef ifstream pifstream;
|
||||
typedef ofstream pofstream;
|
||||
typedef fstream pfstream;
|
||||
typedef std::ifstream pifstream;
|
||||
typedef std::ofstream pofstream;
|
||||
typedef std::fstream pfstream;
|
||||
|
||||
#endif // WITHIN_PANDA
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ DirectDClient::cli_command(const string& cmd) {
|
|||
cerr<<"command "<<cmd<<endl;
|
||||
if (cmd[0]==':') {
|
||||
// ...connect to host.
|
||||
cerr<<"Local command "<<flush;
|
||||
cerr<<"Local command "<<std::flush;
|
||||
string code;
|
||||
cin >> code;
|
||||
string host;
|
||||
|
|
@ -49,7 +49,7 @@ DirectDClient::run_client(const string& host, int port) {
|
|||
connect_to(host, port);
|
||||
|
||||
while (!cin.fail() && _connections.size()!=0) {
|
||||
cout << "directd send: " << flush;
|
||||
cout << "directd send: " << std::flush;
|
||||
string d;
|
||||
cin >> d;
|
||||
cli_command(d);
|
||||
|
|
|
|||
|
|
@ -756,7 +756,7 @@ do_recompute() {
|
|||
|
||||
// We do a stable_sort() to guarantee ordering of events that have the same
|
||||
// start time. These must be invoked in the order in which they appear.
|
||||
stable_sort(_events.begin(), _events.end(), IndirectLess<PlaybackEvent>());
|
||||
std::stable_sort(_events.begin(), _events.end(), IndirectLess<PlaybackEvent>());
|
||||
_duration = int_to_double_time(_end_time);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ static int publish_nest_level = 0;
|
|||
static CPPVisibility publish_previous;
|
||||
static YYLTYPE publish_loc;
|
||||
|
||||
static vector<CPPScope *> last_scopes;
|
||||
static vector<int> last_storage_classes;
|
||||
static vector<CPPStructType *> last_structs;
|
||||
static std::vector<CPPScope *> last_scopes;
|
||||
static std::vector<int> last_storage_classes;
|
||||
static std::vector<CPPStructType *> last_structs;
|
||||
|
||||
int yyparse();
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ static int publish_nest_level = 0;
|
|||
static CPPVisibility publish_previous;
|
||||
static YYLTYPE publish_loc;
|
||||
|
||||
static vector<CPPScope *> last_scopes;
|
||||
static vector<int> last_storage_classes;
|
||||
static vector<CPPStructType *> last_structs;
|
||||
static std::vector<CPPScope *> last_scopes;
|
||||
static std::vector<int> last_storage_classes;
|
||||
static std::vector<CPPStructType *> last_structs;
|
||||
|
||||
int yyparse();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public:
|
|||
CaptureType _type;
|
||||
CPPExpression *_initializer;
|
||||
};
|
||||
typedef vector<Capture> Captures;
|
||||
typedef std::vector<Capture> Captures;
|
||||
Captures _captures;
|
||||
|
||||
CaptureType _default_capture;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,6 @@ public:
|
|||
string _comment;
|
||||
};
|
||||
|
||||
typedef list<CPPCommentBlock *> CPPComments;
|
||||
typedef std::list<CPPCommentBlock *> CPPComments;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -567,12 +567,12 @@ show_line(const YYLTYPE &loc) {
|
|||
}
|
||||
|
||||
// Seek to the offending line in the file.
|
||||
ifstream stream;
|
||||
std::ifstream stream;
|
||||
if (loc.file._filename.open_read(stream)) {
|
||||
int l = 0;
|
||||
string linestr;
|
||||
while (l < loc.first_line) {
|
||||
getline(stream, linestr);
|
||||
std::getline(stream, linestr);
|
||||
++l;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define INLINE inline
|
||||
#define ALWAYS_INLINE inline
|
||||
#define TYPENAME typename
|
||||
|
|
@ -78,8 +76,7 @@ typedef int ios_seekdir;
|
|||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
using namespace std;
|
||||
#include <algorithm>
|
||||
|
||||
#define TYPENAME typename
|
||||
|
||||
|
|
@ -90,10 +87,10 @@ typedef int ios_iostate;
|
|||
// Old iostream libraries used ios::seek_dir instead of ios::seekdir.
|
||||
typedef ios::seek_dir ios_seekdir;
|
||||
#else
|
||||
typedef ios::openmode ios_openmode;
|
||||
typedef ios::fmtflags ios_fmtflags;
|
||||
typedef ios::iostate ios_iostate;
|
||||
typedef ios::seekdir ios_seekdir;
|
||||
typedef std::ios::openmode ios_openmode;
|
||||
typedef std::ios::fmtflags ios_fmtflags;
|
||||
typedef std::ios::iostate ios_iostate;
|
||||
typedef std::ios::seekdir ios_seekdir;
|
||||
#endif
|
||||
|
||||
// Apple has an outdated libstdc++. Not all is lost, though, as we can fill
|
||||
|
|
@ -161,6 +158,36 @@ namespace std {
|
|||
|
||||
#endif // CPPPARSER
|
||||
|
||||
// This was previously `using namespace std`, but we don't want to pull in the
|
||||
// entire namespace, so we enumerate the things we are using without std::
|
||||
// prefix in the Panda headers. It is intended that this list will shrink.
|
||||
using std::cerr;
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
using std::dec;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::ios;
|
||||
using std::iostream;
|
||||
using std::istream;
|
||||
using std::istringstream;
|
||||
using std::max;
|
||||
using std::min;
|
||||
using std::move;
|
||||
using std::ostream;
|
||||
using std::ostringstream;
|
||||
using std::pair;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::streambuf;
|
||||
using std::streamoff;
|
||||
using std::streampos;
|
||||
using std::streamsize;
|
||||
using std::string;
|
||||
using std::stringstream;
|
||||
using std::swap;
|
||||
using std::wstring;
|
||||
|
||||
// The ReferenceCount class is defined later, within Panda, but we need to
|
||||
// pass around forward references to it here at the very low level.
|
||||
class ReferenceCount;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class fake_istream_buffer {
|
||||
public:
|
||||
fake_istream_buffer() {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ protected:
|
|||
private:
|
||||
size_t _page_size;
|
||||
|
||||
typedef map<size_t, DeletedBufferChain *> DeletedChains;
|
||||
typedef std::map<size_t, DeletedBufferChain *> DeletedChains;
|
||||
DeletedChains _deleted_chains;
|
||||
|
||||
mutable MutexImpl _lock;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ private:
|
|||
size_t _remaining;
|
||||
};
|
||||
|
||||
typedef set<Page> Pages;
|
||||
typedef std::set<Page> Pages;
|
||||
Pages _pages;
|
||||
|
||||
size_t _total_alloc;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
#include "deletedChain.h"
|
||||
#include "typeHandle.h"
|
||||
|
||||
using std::allocator;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL allocator. Its
|
||||
* main purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
@ -36,8 +38,8 @@
|
|||
// If we're not trying to make custom allocators (either we don't know what
|
||||
// kind of syntax this STL library wants, or we're compiling with OPTIMIZE 4),
|
||||
// then simply use the standard allocator.
|
||||
#define pallocator_single allocator
|
||||
#define pallocator_array allocator
|
||||
#define pallocator_single std::allocator
|
||||
#define pallocator_array std::allocator
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@
|
|||
#if !defined(USE_STL_ALLOCATOR) || defined(CPPPARSER)
|
||||
// If we're not using custom allocators, just use the standard class
|
||||
// definition.
|
||||
#define pdeque deque
|
||||
#define pdeque std::deque
|
||||
|
||||
#else
|
||||
|
||||
using std::deque;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL deque. Its main
|
||||
* purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ void pdtoa(double value, char *buffer) {
|
|||
#ifdef _MSC_VER
|
||||
if (copysign(1.0, value) < 0) {
|
||||
#else
|
||||
if (signbit(value)) {
|
||||
if (std::signbit(value)) {
|
||||
#endif
|
||||
*buffer++ = '-';
|
||||
value = -value;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@
|
|||
#if !defined(USE_STL_ALLOCATOR) || defined(CPPPARSER)
|
||||
// If we're not using custom allocators, just use the standard class
|
||||
// definition.
|
||||
#define plist list
|
||||
#define plist std::list
|
||||
|
||||
#else
|
||||
|
||||
using std::list;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL list. Its main
|
||||
* purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#if !defined(USE_STL_ALLOCATOR) || defined(CPPPARSER)
|
||||
// If we're not using custom allocators, just use the standard class
|
||||
// definition.
|
||||
#define pmap map
|
||||
#define pmultimap multimap
|
||||
#define pmap std::map
|
||||
#define pmultimap std::multimap
|
||||
|
||||
#ifdef HAVE_STL_HASH
|
||||
#define phash_map stdext::hash_map
|
||||
|
|
@ -40,6 +40,9 @@
|
|||
|
||||
#else // USE_STL_ALLOCATOR
|
||||
|
||||
using std::map;
|
||||
using std::multimap;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL map. Its main
|
||||
* purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
|
|||
|
|
@ -27,19 +27,22 @@
|
|||
#if !defined(USE_STL_ALLOCATOR) || defined(CPPPARSER)
|
||||
// If we're not using custom allocators, just use the standard class
|
||||
// definition.
|
||||
#define pset set
|
||||
#define pmultiset multiset
|
||||
#define pset std::set
|
||||
#define pmultiset std::multiset
|
||||
|
||||
#ifdef HAVE_STL_HASH
|
||||
#define phash_set stdext::hash_set
|
||||
#define phash_multiset stdext::hash_multiset
|
||||
#else // HAVE_STL_HASH
|
||||
#define phash_set set
|
||||
#define phash_multiset multiset
|
||||
#define phash_set std::set
|
||||
#define phash_multiset std::multiset
|
||||
#endif // HAVE_STL_HASH
|
||||
|
||||
#else // USE_STL_ALLOCATOR
|
||||
|
||||
using std::set;
|
||||
using std::multiset;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL set. Its main
|
||||
* purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@
|
|||
#elif defined(CPPPARSER)
|
||||
// Simplified definition to speed up Interrogate parsing.
|
||||
template<class Type>
|
||||
class pvector : public vector<Type> {
|
||||
class pvector : public std::vector<Type> {
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
using std::vector;
|
||||
|
||||
/**
|
||||
* This is our own Panda specialization on the default STL vector. Its main
|
||||
* purpose is to call the hooks for MemoryUsage to properly track STL-
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#ifdef HAVE_STL_HASH
|
||||
#include <hash_map> // for hash_compare
|
||||
|
||||
using std::less;
|
||||
|
||||
template<class Key, class Compare = less<Key> >
|
||||
class stl_hash_compare : public stdext::hash_compare<Key, Compare> {
|
||||
public:
|
||||
|
|
@ -36,6 +38,8 @@ public:
|
|||
|
||||
#include <map> // for less
|
||||
|
||||
using std::less;
|
||||
|
||||
// This is declared for the cases in which we don't have STL_HASH available.
|
||||
template<class Key, class Compare = less<Key> >
|
||||
class stl_hash_compare : public Compare {
|
||||
|
|
|
|||
|
|
@ -100,13 +100,13 @@ private:
|
|||
|
||||
static INLINE void init_lock();
|
||||
|
||||
typedef vector<TypeRegistryNode *> HandleRegistry;
|
||||
typedef std::vector<TypeRegistryNode *> HandleRegistry;
|
||||
HandleRegistry _handle_registry;
|
||||
|
||||
typedef map<string, TypeRegistryNode *> NameRegistry;
|
||||
typedef std::map<string, TypeRegistryNode *> NameRegistry;
|
||||
NameRegistry _name_registry;
|
||||
|
||||
typedef vector<TypeRegistryNode *> RootClasses;
|
||||
typedef std::vector<TypeRegistryNode *> RootClasses;
|
||||
RootClasses _root_classes;
|
||||
|
||||
bool _derivations_fresh;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
TypeHandle _handle;
|
||||
string _name;
|
||||
TypeHandle &_ref;
|
||||
typedef vector<TypeRegistryNode *> Classes;
|
||||
typedef std::vector<TypeRegistryNode *> Classes;
|
||||
Classes _parent_classes;
|
||||
Classes _child_classes;
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ private:
|
|||
SubtreeMaskType _mask;
|
||||
SubtreeMaskType _bits;
|
||||
};
|
||||
typedef vector<Inherit> TopInheritance;
|
||||
typedef std::vector<Inherit> TopInheritance;
|
||||
|
||||
void r_build_subtrees(TypeRegistryNode *top,
|
||||
int bit_count, SubtreeMaskType bits);
|
||||
|
|
|
|||
|
|
@ -220,8 +220,8 @@ append_path(const string &path, const string &separator) {
|
|||
*/
|
||||
void DSearchPath::
|
||||
append_path(const DSearchPath &path) {
|
||||
copy(path._directories.begin(), path._directories.end(),
|
||||
back_inserter(_directories));
|
||||
std::copy(path._directories.begin(), path._directories.end(),
|
||||
std::back_inserter(_directories));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -232,8 +232,8 @@ void DSearchPath::
|
|||
prepend_path(const DSearchPath &path) {
|
||||
if (!path._directories.empty()) {
|
||||
Directories new_directories = path._directories;
|
||||
copy(_directories.begin(), _directories.end(),
|
||||
back_inserter(new_directories));
|
||||
std::copy(_directories.begin(), _directories.end(),
|
||||
std::back_inserter(new_directories));
|
||||
_directories.swap(new_directories);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1855,7 +1855,7 @@ scan_directory(vector_string &contents) const {
|
|||
* or set_binary().
|
||||
*/
|
||||
bool Filename::
|
||||
open_read(ifstream &stream) const {
|
||||
open_read(std::ifstream &stream) const {
|
||||
assert(!get_pattern());
|
||||
assert(is_binary_or_text());
|
||||
|
||||
|
|
@ -1891,7 +1891,7 @@ open_read(ifstream &stream) const {
|
|||
* if it already exists. Otherwise, the file is kept at its original length.
|
||||
*/
|
||||
bool Filename::
|
||||
open_write(ofstream &stream, bool truncate) const {
|
||||
open_write(std::ofstream &stream, bool truncate) const {
|
||||
assert(!get_pattern());
|
||||
assert(is_binary_or_text());
|
||||
|
||||
|
|
@ -1937,7 +1937,7 @@ open_write(ofstream &stream, bool truncate) const {
|
|||
* or set_binary().
|
||||
*/
|
||||
bool Filename::
|
||||
open_append(ofstream &stream) const {
|
||||
open_append(std::ofstream &stream) const {
|
||||
assert(!get_pattern());
|
||||
assert(is_binary_or_text());
|
||||
|
||||
|
|
@ -1969,7 +1969,7 @@ open_append(ofstream &stream) const {
|
|||
* one of set_text() or set_binary().
|
||||
*/
|
||||
bool Filename::
|
||||
open_read_write(fstream &stream, bool truncate) const {
|
||||
open_read_write(std::fstream &stream, bool truncate) const {
|
||||
assert(!get_pattern());
|
||||
assert(is_binary_or_text());
|
||||
|
||||
|
|
@ -2011,7 +2011,7 @@ open_read_write(fstream &stream, bool truncate) const {
|
|||
* open_read() without first calling one of set_text() or set_binary().
|
||||
*/
|
||||
bool Filename::
|
||||
open_read_append(fstream &stream) const {
|
||||
open_read_append(std::fstream &stream) const {
|
||||
assert(!get_pattern());
|
||||
assert(is_binary_or_text());
|
||||
|
||||
|
|
|
|||
|
|
@ -203,11 +203,11 @@ PUBLISHED:
|
|||
EXTENSION(PyObject *scan_directory() const);
|
||||
#endif
|
||||
|
||||
bool open_read(ifstream &stream) const;
|
||||
bool open_write(ofstream &stream, bool truncate = true) const;
|
||||
bool open_append(ofstream &stream) const;
|
||||
bool open_read_write(fstream &stream, bool truncate = false) const;
|
||||
bool open_read_append(fstream &stream) const;
|
||||
bool open_read(std::ifstream &stream) const;
|
||||
bool open_write(std::ofstream &stream, bool truncate = true) const;
|
||||
bool open_append(std::ofstream &stream) const;
|
||||
bool open_read_write(std::fstream &stream, bool truncate = false) const;
|
||||
bool open_read_append(std::fstream &stream) const;
|
||||
|
||||
#ifdef USE_PANDAFILESTREAM
|
||||
bool open_read(pifstream &stream) const;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public:
|
|||
F_explicit_args = 0x8000,
|
||||
};
|
||||
|
||||
typedef vector<Parameter> Parameters;
|
||||
typedef std::vector<Parameter> Parameters;
|
||||
|
||||
Parameters _parameters;
|
||||
ParameterRemap *_return_type;
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ wrap_global_functions() {
|
|||
* added to the end.
|
||||
*/
|
||||
void InterfaceMaker::
|
||||
get_function_remaps(vector<FunctionRemap *> &remaps) {
|
||||
get_function_remaps(std::vector<FunctionRemap *> &remaps) {
|
||||
FunctionsByIndex::iterator fi;
|
||||
for (fi = _functions.begin(); fi != _functions.end(); ++fi) {
|
||||
Function *func = (*fi).second;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
virtual bool separate_overloading();
|
||||
virtual bool wrap_global_functions();
|
||||
|
||||
void get_function_remaps(vector<FunctionRemap *> &remaps);
|
||||
void get_function_remaps(std::vector<FunctionRemap *> &remaps);
|
||||
|
||||
static ostream &indent(ostream &out, int indent_level);
|
||||
|
||||
|
|
@ -100,14 +100,14 @@ public:
|
|||
string _name;
|
||||
const InterrogateType &_itype;
|
||||
const InterrogateFunction &_ifunc;
|
||||
typedef vector<FunctionRemap *> Remaps;
|
||||
typedef std::vector<FunctionRemap *> Remaps;
|
||||
Remaps _remaps;
|
||||
bool _has_this;
|
||||
int _flags;
|
||||
ArgsType _args_type;
|
||||
};
|
||||
typedef map<FunctionIndex, Function *> FunctionsByIndex;
|
||||
typedef vector<Function *> Functions;
|
||||
typedef std::map<FunctionIndex, Function *> FunctionsByIndex;
|
||||
typedef std::vector<Function *> Functions;
|
||||
FunctionsByIndex _functions;
|
||||
|
||||
class MakeSeq {
|
||||
|
|
@ -119,15 +119,15 @@ public:
|
|||
Function *_length_getter;
|
||||
Function *_element_getter;
|
||||
};
|
||||
typedef vector<MakeSeq *> MakeSeqs;
|
||||
typedef std::vector<MakeSeq *> MakeSeqs;
|
||||
|
||||
class Property {
|
||||
public:
|
||||
Property(const InterrogateElement &ielement);
|
||||
|
||||
const InterrogateElement &_ielement;
|
||||
vector<FunctionRemap *> _getter_remaps;
|
||||
vector<FunctionRemap *> _setter_remaps;
|
||||
std::vector<FunctionRemap *> _getter_remaps;
|
||||
std::vector<FunctionRemap *> _setter_remaps;
|
||||
Function *_length_function;
|
||||
Function *_has_function;
|
||||
Function *_clear_function;
|
||||
|
|
@ -136,7 +136,7 @@ public:
|
|||
Function *_getkey_function;
|
||||
bool _has_this;
|
||||
};
|
||||
typedef vector<Property *> Properties;
|
||||
typedef std::vector<Property *> Properties;
|
||||
|
||||
class Object {
|
||||
public:
|
||||
|
|
@ -162,10 +162,10 @@ public:
|
|||
};
|
||||
int _protocol_types;
|
||||
};
|
||||
typedef map<TypeIndex, Object *> Objects;
|
||||
typedef std::map<TypeIndex, Object *> Objects;
|
||||
Objects _objects;
|
||||
|
||||
typedef map<string, FunctionRemap *> WrappersByHash;
|
||||
typedef std::map<string, FunctionRemap *> WrappersByHash;
|
||||
WrappersByHash _wrappers_by_hash;
|
||||
|
||||
virtual FunctionRemap *
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ add_source_file(const string &filename) {
|
|||
void InterrogateBuilder::
|
||||
read_command_file(istream &in) {
|
||||
string line;
|
||||
getline(in, line);
|
||||
std::getline(in, line);
|
||||
while (!in.fail() && !in.eof()) {
|
||||
// Strip out the comment.
|
||||
size_t hash = line.find('#');
|
||||
|
|
@ -110,7 +110,7 @@ read_command_file(istream &in) {
|
|||
|
||||
do_command(command, params);
|
||||
}
|
||||
getline(in, line);
|
||||
std::getline(in, line);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ build() {
|
|||
*/
|
||||
void InterrogateBuilder::
|
||||
write_code(ostream &out_code,ostream * out_include, InterrogateModuleDef *def) {
|
||||
typedef vector<InterfaceMaker *> InterfaceMakers;
|
||||
typedef std::vector<InterfaceMaker *> InterfaceMakers;
|
||||
InterfaceMakers makers;
|
||||
|
||||
if (build_c_wrappers) {
|
||||
|
|
@ -443,7 +443,7 @@ write_code(ostream &out_code,ostream * out_include, InterrogateModuleDef *def) {
|
|||
}
|
||||
|
||||
// Now collect all the function wrappers.
|
||||
vector<FunctionRemap *> remaps;
|
||||
std::vector<FunctionRemap *> remaps;
|
||||
for (mi = makers.begin(); mi != makers.end(); ++mi) {
|
||||
(*mi)->get_function_remaps(remaps);
|
||||
}
|
||||
|
|
@ -457,7 +457,7 @@ write_code(ostream &out_code,ostream * out_include, InterrogateModuleDef *def) {
|
|||
int num_wrappers = 0;
|
||||
map<int, FunctionRemap *> wrappers_by_index;
|
||||
|
||||
vector<FunctionRemap *>::iterator ri;
|
||||
std::vector<FunctionRemap *>::iterator ri;
|
||||
for (ri = remaps.begin(); ri != remaps.end(); ++ri) {
|
||||
FunctionRemap *remap = (*ri);
|
||||
wrappers_by_index[remap->_wrapper_index] = remap;
|
||||
|
|
@ -960,7 +960,7 @@ is_inherited_published(CPPInstance *function, CPPStructType *struct_type) {
|
|||
* purpose of this function.
|
||||
*/
|
||||
void InterrogateBuilder::
|
||||
remap_indices(vector<FunctionRemap *> &remaps) {
|
||||
remap_indices(std::vector<FunctionRemap *> &remaps) {
|
||||
IndexRemapper index_remap;
|
||||
InterrogateDatabase::get_ptr()->remap_indices(1, index_remap);
|
||||
|
||||
|
|
@ -976,7 +976,7 @@ remap_indices(vector<FunctionRemap *> &remaps) {
|
|||
(*fi).second = index_remap.map_from((*fi).second);
|
||||
}
|
||||
|
||||
vector<FunctionRemap *>::iterator ri;
|
||||
std::vector<FunctionRemap *>::iterator ri;
|
||||
for (ri = remaps.begin(); ri != remaps.end(); ++ri) {
|
||||
FunctionRemap *remap = (*ri);
|
||||
remap->_wrapper_index = index_remap.map_from(remap->_wrapper_index);
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ public:
|
|||
TypeIndex get_type(CPPType *type, bool global);
|
||||
|
||||
public:
|
||||
typedef set<string> Commands;
|
||||
typedef map<string, string> CommandParams;
|
||||
typedef std::set<string> Commands;
|
||||
typedef std::map<string, string> CommandParams;
|
||||
void insert_param_list(InterrogateBuilder::Commands &commands,
|
||||
const string ¶ms);
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
bool is_inherited_published(CPPInstance *function, CPPStructType *struct_type);
|
||||
|
||||
void remap_indices(vector<FunctionRemap *> &remaps);
|
||||
void remap_indices(std::vector<FunctionRemap *> &remaps);
|
||||
void scan_function(CPPFunctionGroup *fgroup);
|
||||
void scan_function(CPPInstance *function);
|
||||
void scan_struct_type(CPPStructType *type);
|
||||
|
|
@ -135,17 +135,17 @@ public:
|
|||
|
||||
static string trim_blanks(const string &str);
|
||||
|
||||
typedef map<string, TypeIndex> TypesByName;
|
||||
typedef map<string, FunctionIndex> FunctionsByName;
|
||||
typedef map<string, MakeSeqIndex> MakeSeqsByName;
|
||||
typedef map<string, ElementIndex> PropertiesByName;
|
||||
typedef std::map<string, TypeIndex> TypesByName;
|
||||
typedef std::map<string, FunctionIndex> FunctionsByName;
|
||||
typedef std::map<string, MakeSeqIndex> MakeSeqsByName;
|
||||
typedef std::map<string, ElementIndex> PropertiesByName;
|
||||
|
||||
TypesByName _types_by_name;
|
||||
FunctionsByName _functions_by_name;
|
||||
MakeSeqsByName _make_seqs_by_name;
|
||||
PropertiesByName _properties_by_name;
|
||||
|
||||
typedef map<string, char> IncludeFiles;
|
||||
typedef std::map<string, char> IncludeFiles;
|
||||
IncludeFiles _include_files;
|
||||
|
||||
Commands _forcetype;
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ upcase_string(const string &str) {
|
|||
* Finds a dependency cycle between the given dependency mapping, starting at
|
||||
* the node that is already placed in the given cycle vector.
|
||||
*/
|
||||
static bool find_dependency_cycle(vector_string &cycle, map<string, set<string> > &dependencies) {
|
||||
static bool find_dependency_cycle(vector_string &cycle, std::map<string, std::set<string> > &dependencies) {
|
||||
assert(!cycle.empty());
|
||||
|
||||
const set<string> &deps = dependencies[cycle.back()];
|
||||
const std::set<string> &deps = dependencies[cycle.back()];
|
||||
for (auto it = deps.begin(); it != deps.end(); ++it) {
|
||||
auto it2 = std::find(cycle.begin(), cycle.end(), *it);
|
||||
if (it2 != cycle.end()) {
|
||||
|
|
@ -156,7 +156,7 @@ int write_python_table_native(ostream &out) {
|
|||
|
||||
int count = 0;
|
||||
|
||||
map<string, set<string> > dependencies;
|
||||
std::map<string, std::set<string> > dependencies;
|
||||
|
||||
// out << "extern \"C\" {\n";
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ int write_python_table_native(ostream &out) {
|
|||
if (interrogate_type_has_module_name(thetype) && module_name == interrogate_type_module_name(thetype)) {
|
||||
if (interrogate_type_has_library_name(thetype)) {
|
||||
string library_name = interrogate_type_library_name(thetype);
|
||||
set<string> &deps = dependencies[library_name];
|
||||
std::set<string> &deps = dependencies[library_name];
|
||||
|
||||
// Get the dependencies for this library.
|
||||
int num_derivations = interrogate_type_number_of_derivations(thetype);
|
||||
|
|
@ -219,7 +219,7 @@ int write_python_table_native(ostream &out) {
|
|||
|
||||
for (auto it = dependencies.begin(); it != dependencies.end(); ++it) {
|
||||
const string &library_name = it->first;
|
||||
set<string> &deps = dependencies[library_name];
|
||||
std::set<string> &deps = dependencies[library_name];
|
||||
|
||||
// Remove the dependencies that have already been added from the deps.
|
||||
if (!deps.empty()) {
|
||||
|
|
@ -243,7 +243,7 @@ int write_python_table_native(ostream &out) {
|
|||
cerr << "Circular dependency between libraries detected:\n";
|
||||
for (auto it = dependencies.begin(); it != dependencies.end(); ++it) {
|
||||
const string &library_name = it->first;
|
||||
set<string> &deps = dependencies[library_name];
|
||||
std::set<string> &deps = dependencies[library_name];
|
||||
if (deps.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ main(int argc, char **argv) {
|
|||
while (cin) {
|
||||
string str;
|
||||
cout << "Enter an expression or type name:\n";
|
||||
getline(cin, str);
|
||||
std::getline(std::cin, str);
|
||||
if (!str.empty()) {
|
||||
|
||||
size_t space = str.find(' ');
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ in_map(int from) const {
|
|||
*/
|
||||
int IndexRemapper::
|
||||
map_from(int from) const {
|
||||
map<int, int>::const_iterator mi;
|
||||
std::map<int, int>::const_iterator mi;
|
||||
mi = _map_int.find(from);
|
||||
if (mi == _map_int.end()) {
|
||||
return from;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
int map_from(int from) const;
|
||||
|
||||
private:
|
||||
map<int, int> _map_int;
|
||||
std::map<int, int> _map_int;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ private:
|
|||
InterrogateModuleDef *_def;
|
||||
string _name;
|
||||
|
||||
typedef vector<string> Strings;
|
||||
typedef std::vector<string> Strings;
|
||||
Strings _alt_names;
|
||||
|
||||
friend class InterrogateBuilder;
|
||||
|
|
|
|||
|
|
@ -124,41 +124,41 @@ private:
|
|||
const string &wrapper_hash_name);
|
||||
|
||||
// This data is loaded from the various database files.
|
||||
typedef map<TypeIndex, InterrogateType> TypeMap;
|
||||
typedef std::map<TypeIndex, InterrogateType> TypeMap;
|
||||
TypeMap _type_map;
|
||||
typedef map<FunctionIndex, InterrogateFunction *> FunctionMap;
|
||||
typedef std::map<FunctionIndex, InterrogateFunction *> FunctionMap;
|
||||
FunctionMap _function_map;
|
||||
typedef map<FunctionWrapperIndex, InterrogateFunctionWrapper> FunctionWrapperMap;
|
||||
typedef std::map<FunctionWrapperIndex, InterrogateFunctionWrapper> FunctionWrapperMap;
|
||||
FunctionWrapperMap _wrapper_map;
|
||||
|
||||
typedef map<ManifestIndex, InterrogateManifest> ManifestMap;
|
||||
typedef std::map<ManifestIndex, InterrogateManifest> ManifestMap;
|
||||
ManifestMap _manifest_map;
|
||||
typedef map<ElementIndex, InterrogateElement> ElementMap;
|
||||
typedef std::map<ElementIndex, InterrogateElement> ElementMap;
|
||||
ElementMap _element_map;
|
||||
|
||||
typedef map<MakeSeqIndex, InterrogateMakeSeq> MakeSeqMap;
|
||||
typedef std::map<MakeSeqIndex, InterrogateMakeSeq> MakeSeqMap;
|
||||
MakeSeqMap _make_seq_map;
|
||||
|
||||
typedef vector<TypeIndex> GlobalTypes;
|
||||
typedef std::vector<TypeIndex> GlobalTypes;
|
||||
GlobalTypes _global_types;
|
||||
GlobalTypes _all_types;
|
||||
typedef vector<FunctionIndex> GlobalFunctions;
|
||||
typedef std::vector<FunctionIndex> GlobalFunctions;
|
||||
GlobalFunctions _global_functions;
|
||||
GlobalFunctions _all_functions;
|
||||
typedef vector<ManifestIndex> GlobalManifests;
|
||||
typedef std::vector<ManifestIndex> GlobalManifests;
|
||||
GlobalManifests _global_manifests;
|
||||
typedef vector<ElementIndex> GlobalElements;
|
||||
typedef std::vector<ElementIndex> GlobalElements;
|
||||
GlobalElements _global_elements;
|
||||
|
||||
// This data is compiled in directly to the shared libraries that we link
|
||||
// with.
|
||||
typedef vector<InterrogateModuleDef *> Modules;
|
||||
typedef std::vector<InterrogateModuleDef *> Modules;
|
||||
Modules _modules;
|
||||
typedef map<string, InterrogateModuleDef *> ModulesByHash;
|
||||
typedef std::map<string, InterrogateModuleDef *> ModulesByHash;
|
||||
ModulesByHash _modules_by_hash;
|
||||
|
||||
// This records the set of database files that are still to be loaded.
|
||||
typedef vector<InterrogateModuleDef *> Requests;
|
||||
typedef std::vector<InterrogateModuleDef *> Requests;
|
||||
Requests _requests;
|
||||
|
||||
bool _error_flag;
|
||||
|
|
@ -174,7 +174,7 @@ private:
|
|||
};
|
||||
|
||||
int _lookups_fresh;
|
||||
typedef map<string, int> Lookup;
|
||||
typedef std::map<string, int> Lookup;
|
||||
Lookup _types_by_name;
|
||||
Lookup _types_by_scoped_name;
|
||||
Lookup _types_by_true_name;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ private:
|
|||
string _prototype;
|
||||
TypeIndex _class;
|
||||
|
||||
typedef vector<FunctionWrapperIndex> Wrappers;
|
||||
typedef std::vector<FunctionWrapperIndex> Wrappers;
|
||||
Wrappers _c_wrappers;
|
||||
Wrappers _python_wrappers;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ public:
|
|||
// This must be a pointer, rather than a concrete map, so we don't risk
|
||||
// trying to create a map in one DLL and access it in another. Silly
|
||||
// Windows.
|
||||
typedef map<string, CPPInstance *> Instances;
|
||||
typedef std::map<string, CPPInstance *> Instances;
|
||||
Instances *_instances;
|
||||
string _expression;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
typedef vector<Parameter> Parameters;
|
||||
typedef std::vector<Parameter> Parameters;
|
||||
Parameters _parameters;
|
||||
|
||||
friend class InterrogateBuilder;
|
||||
|
|
|
|||
|
|
@ -154,16 +154,16 @@ public:
|
|||
TypeIndex _wrapped_type;
|
||||
int _array_size;
|
||||
|
||||
typedef vector<FunctionIndex> Functions;
|
||||
typedef std::vector<FunctionIndex> Functions;
|
||||
Functions _constructors;
|
||||
FunctionIndex _destructor;
|
||||
|
||||
typedef vector<ElementIndex> Elements;
|
||||
typedef std::vector<ElementIndex> Elements;
|
||||
Elements _elements;
|
||||
Functions _methods;
|
||||
Functions _casts;
|
||||
|
||||
typedef vector<MakeSeqIndex> MakeSeqs;
|
||||
typedef std::vector<MakeSeqIndex> MakeSeqs;
|
||||
MakeSeqs _make_seqs;
|
||||
|
||||
enum DerivationFlags {
|
||||
|
|
@ -188,7 +188,7 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
typedef vector<Derivation> Derivations;
|
||||
typedef std::vector<Derivation> Derivations;
|
||||
Derivations _derivations;
|
||||
|
||||
public:
|
||||
|
|
@ -205,10 +205,10 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
typedef vector<EnumValue> EnumValues;
|
||||
typedef std::vector<EnumValue> EnumValues;
|
||||
EnumValues _enum_values;
|
||||
|
||||
typedef vector<TypeIndex> Types;
|
||||
typedef std::vector<TypeIndex> Types;
|
||||
Types _nested_types;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
*/
|
||||
template<class Element>
|
||||
void
|
||||
idf_output_vector(ostream &out, const vector<Element> &vec) {
|
||||
idf_output_vector(ostream &out, const std::vector<Element> &vec) {
|
||||
out << vec.size() << " ";
|
||||
TYPENAME vector<Element>::const_iterator vi;
|
||||
TYPENAME std::vector<Element>::const_iterator vi;
|
||||
for (vi = vec.begin(); vi != vec.end(); ++vi) {
|
||||
out << (*vi) << " ";
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ idf_output_vector(ostream &out, const vector<Element> &vec) {
|
|||
*/
|
||||
template<class Element>
|
||||
void
|
||||
idf_input_vector(istream &in, vector<Element> &vec) {
|
||||
idf_input_vector(istream &in, std::vector<Element> &vec) {
|
||||
int length;
|
||||
in >> length;
|
||||
if (in.fail()) {
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ void idf_output_string(ostream &out, const char *str, char whitespace = ' ');
|
|||
void idf_input_string(istream &in, const char *&str);
|
||||
|
||||
template<class Element>
|
||||
void idf_output_vector(ostream &out, const vector<Element> &vec);
|
||||
void idf_output_vector(ostream &out, const std::vector<Element> &vec);
|
||||
|
||||
template<class Element>
|
||||
void idf_input_vector(istream &in, vector<Element> &vec);
|
||||
void idf_input_vector(istream &in, std::vector<Element> &vec);
|
||||
|
||||
#include "interrogate_datafile.I"
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ ALWAYS_INLINE PyObject *Dtool_WrapValue(wchar_t value) {
|
|||
return PyUnicode_FromWideChar(&value, 1);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(nullptr_t) {
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(std::nullptr_t) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ ALWAYS_INLINE PyObject *Dtool_WrapValue(const std::string *value);
|
|||
ALWAYS_INLINE PyObject *Dtool_WrapValue(const std::wstring *value);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(char value);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(wchar_t value);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(nullptr_t);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(std::nullptr_t);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(PyObject *value);
|
||||
ALWAYS_INLINE PyObject *Dtool_WrapValue(const vector_uchar &value);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include <stdtypedefs.h>
|
||||
|
||||
inline namespace std {
|
||||
|
||||
template<class element>
|
||||
class vector {
|
||||
public:
|
||||
|
|
@ -40,4 +42,6 @@ public:
|
|||
typedef size_t size_type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ private:
|
|||
short _flags;
|
||||
};
|
||||
|
||||
typedef vector<Word> Words;
|
||||
typedef std::vector<Word> Words;
|
||||
Words _words;
|
||||
bool _got_words;
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ private:
|
|||
int _next_decl_seq;
|
||||
int _trust_level;
|
||||
|
||||
typedef vector<ConfigDeclaration *> Declarations;
|
||||
typedef std::vector<ConfigDeclaration *> Declarations;
|
||||
Declarations _declarations;
|
||||
|
||||
string _signature;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ private:
|
|||
|
||||
void config_initialized();
|
||||
|
||||
typedef vector<ConfigPage *> Pages;
|
||||
typedef std::vector<ConfigPage *> Pages;
|
||||
Pages _implicit_pages;
|
||||
Pages _explicit_pages;
|
||||
bool _pages_sorted;
|
||||
|
|
@ -87,7 +87,7 @@ private:
|
|||
|
||||
DSearchPath _search_path;
|
||||
|
||||
typedef vector<GlobPattern> Globs;
|
||||
typedef std::vector<GlobPattern> Globs;
|
||||
Globs _prc_patterns;
|
||||
Globs _prc_encrypted_patterns;
|
||||
Globs _prc_executable_patterns;
|
||||
|
|
@ -105,7 +105,7 @@ private:
|
|||
int _file_flags;
|
||||
Filename _filename;
|
||||
};
|
||||
typedef vector<ConfigFile> ConfigFiles;
|
||||
typedef std::vector<ConfigFile> ConfigFiles;
|
||||
|
||||
static ConfigPageManager *_global_ptr;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ private:
|
|||
ConfigDeclaration *_default_value;
|
||||
ConfigDeclaration *_local_value;
|
||||
|
||||
typedef vector<const ConfigDeclaration *> Declarations;
|
||||
typedef std::vector<const ConfigDeclaration *> Declarations;
|
||||
Declarations _declarations;
|
||||
Declarations _trusted_declarations;
|
||||
Declarations _untrusted_declarations;
|
||||
|
|
|
|||
|
|
@ -67,13 +67,13 @@ private:
|
|||
|
||||
// We have to avoid pmap and pvector, due to the very low-level nature of
|
||||
// this stuff.
|
||||
typedef vector<ConfigVariableCore *> Variables;
|
||||
typedef std::vector<ConfigVariableCore *> Variables;
|
||||
Variables _variables;
|
||||
|
||||
typedef map<string, ConfigVariableCore *> VariablesByName;
|
||||
typedef std::map<string, ConfigVariableCore *> VariablesByName;
|
||||
VariablesByName _variables_by_name;
|
||||
|
||||
typedef map<GlobPattern, ConfigVariableCore *> VariableTemplates;
|
||||
typedef std::map<GlobPattern, ConfigVariableCore *> VariableTemplates;
|
||||
VariableTemplates _variable_templates;
|
||||
|
||||
static ConfigVariableManager *_global_ptr;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ Notify *Notify::_global_ptr = (Notify *)NULL;
|
|||
*/
|
||||
Notify::
|
||||
Notify() {
|
||||
_ostream_ptr = &cerr;
|
||||
_ostream_ptr = &std::cerr;
|
||||
_owns_ostream_ptr = false;
|
||||
_null_ostream_ptr = new fstream;
|
||||
_null_ostream_ptr = new std::fstream;
|
||||
|
||||
_assert_handler = (AssertHandler *)NULL;
|
||||
_assert_failed = false;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ private:
|
|||
string _basename;
|
||||
NotifyCategory *_parent;
|
||||
ConfigVariableEnum<NotifySeverity> _severity;
|
||||
typedef vector<NotifyCategory *> Children;
|
||||
typedef std::vector<NotifyCategory *> Children;
|
||||
Children _children;
|
||||
|
||||
static long _server_delta; // not a time_t because server delta may be signed.
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ private:
|
|||
|
||||
// This shouldn't be a pmap, since it might be invoked before we initialize
|
||||
// the global malloc pointers.
|
||||
typedef map<string, NotifyCategory *> Categories;
|
||||
typedef std::map<string, NotifyCategory *> Categories;
|
||||
Categories _categories;
|
||||
|
||||
static Notify *_global_ptr;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ private:
|
|||
time_t _generated_time;
|
||||
};
|
||||
|
||||
typedef vector<Key> Keys;
|
||||
typedef std::vector<Key> Keys;
|
||||
Keys _keys;
|
||||
|
||||
static PrcKeyRegistry *_global_ptr;
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ public:
|
|||
*/
|
||||
void PartGroup::
|
||||
sort_descendants() {
|
||||
stable_sort(_children.begin(), _children.end(), PartGroupAlphabeticalOrder());
|
||||
std::stable_sort(_children.begin(), _children.end(), PartGroupAlphabeticalOrder());
|
||||
|
||||
Children::iterator ci;
|
||||
for (ci = _children.begin(); ci != _children.end(); ++ci) {
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ prepare_colliders_single(CollisionTraverser::LevelStatesSingle &level_states,
|
|||
for (i = 0; i < num_colliders; ++i) {
|
||||
indirect[i] = i;
|
||||
}
|
||||
sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
std::sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
|
||||
int num_remaining_colliders = num_colliders;
|
||||
for (i = 0; i < num_colliders; ++i) {
|
||||
|
|
@ -706,7 +706,7 @@ prepare_colliders_double(CollisionTraverser::LevelStatesDouble &level_states,
|
|||
for (i = 0; i < num_colliders; ++i) {
|
||||
indirect[i] = i;
|
||||
}
|
||||
sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
std::sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
|
||||
int num_remaining_colliders = num_colliders;
|
||||
for (i = 0; i < num_colliders; ++i) {
|
||||
|
|
@ -917,7 +917,7 @@ prepare_colliders_quad(CollisionTraverser::LevelStatesQuad &level_states,
|
|||
for (i = 0; i < num_colliders; ++i) {
|
||||
indirect[i] = i;
|
||||
}
|
||||
sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
std::sort(indirect, indirect + num_colliders, SortByColliderSort(*this));
|
||||
|
||||
int num_remaining_colliders = num_colliders;
|
||||
for (i = 0; i < num_colliders; ++i) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ add_object(CullableObject *object, Thread *current_thread) {
|
|||
void CullBinFixed::
|
||||
finish_cull(SceneSetup *, Thread *current_thread) {
|
||||
PStatTimer timer(_cull_this_pcollector, current_thread);
|
||||
stable_sort(_objects.begin(), _objects.end());
|
||||
std::stable_sort(_objects.begin(), _objects.end());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1540,7 +1540,9 @@ do_determine_display_regions(GraphicsOutput::CData *cdata) {
|
|||
}
|
||||
}
|
||||
|
||||
stable_sort(cdata->_active_display_regions.begin(), cdata->_active_display_regions.end(), IndirectLess<DisplayRegion>());
|
||||
std::stable_sort(cdata->_active_display_regions.begin(),
|
||||
cdata->_active_display_regions.end(),
|
||||
IndirectLess<DisplayRegion>());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ add_python_event_handler(PyObject* handler, PyObject* name){
|
|||
*/
|
||||
void Extension<GraphicsWindow>::
|
||||
remove_python_event_handler(PyObject* name){
|
||||
list<PythonGraphicsWindowProc*> toRemove;
|
||||
std::list<PythonGraphicsWindowProc*> toRemove;
|
||||
GraphicsWindow::PythonWinProcClasses::iterator iter;
|
||||
for (iter = _this->_python_window_proc_classes.begin(); iter != _this->_python_window_proc_classes.end(); ++iter) {
|
||||
PythonGraphicsWindowProc* pgwp = (PythonGraphicsWindowProc*)*iter;
|
||||
|
|
@ -43,7 +43,7 @@ remove_python_event_handler(PyObject* name){
|
|||
}
|
||||
#endif
|
||||
}
|
||||
list<PythonGraphicsWindowProc*>::iterator iter2;
|
||||
std::list<PythonGraphicsWindowProc*>::iterator iter2;
|
||||
for (iter2 = toRemove.begin(); iter2 != toRemove.end(); ++iter2) {
|
||||
PythonGraphicsWindowProc* pgwp = *iter2;
|
||||
_this->remove_window_proc(pgwp);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
const char SubprocessWindowBuffer::
|
||||
_magic_number[SubprocessWindowBuffer::magic_number_length] = "pNdaSWB";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include <stdio.h> // perror
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* This is a special class that is designed to faciliate SubprocessWindow.
|
||||
|
|
|
|||
|
|
@ -1637,7 +1637,7 @@ run_ssl_handshake() {
|
|||
if (downloader_cat.is_spam()) {
|
||||
downloader_cat.spam()
|
||||
<< _NOTIFY_HTTP_CHANNEL_ID
|
||||
<< "Received certificate from server:\n" << flush;
|
||||
<< "Received certificate from server:\n" << std::flush;
|
||||
X509_print_fp(stderr, cert);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
|
@ -2144,14 +2144,14 @@ run_reading_body() {
|
|||
}
|
||||
|
||||
string line;
|
||||
getline(*_body_stream, line);
|
||||
std::getline(*_body_stream, line);
|
||||
while (!_body_stream->fail() && !_body_stream->eof()) {
|
||||
if (downloader_cat.is_spam()) {
|
||||
downloader_cat.spam()
|
||||
<< _NOTIFY_HTTP_CHANNEL_ID
|
||||
<< "skip: " << line << "\n";
|
||||
}
|
||||
getline(*_body_stream, line);
|
||||
std::getline(*_body_stream, line);
|
||||
}
|
||||
|
||||
if (!_body_stream->is_closed()) {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ const string &
|
|||
get_password() {
|
||||
if (!got_password) {
|
||||
cerr << "Enter password: ";
|
||||
getline(cin, password);
|
||||
std::getline(std::cin, password);
|
||||
got_password = true;
|
||||
}
|
||||
|
||||
|
|
@ -650,7 +650,7 @@ list_files(const vector_string ¶ms) {
|
|||
|
||||
int i;
|
||||
if (verbose) {
|
||||
cout << num_subfiles << " subfiles:\n" << flush;
|
||||
cout << num_subfiles << " subfiles:\n" << std::flush;
|
||||
for (i = 0; i < num_subfiles; i++) {
|
||||
string subfile_name = multifile->get_subfile_name(i);
|
||||
if (is_named(subfile_name, params)) {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ main(int argc, char **argv) {
|
|||
// Prompt for password.
|
||||
if (!got_password) {
|
||||
cerr << "Enter password: ";
|
||||
getline(cin, password);
|
||||
std::getline(std::cin, password);
|
||||
got_password = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ main(int argc, char **argv) {
|
|||
// Prompt for password.
|
||||
if (!got_password) {
|
||||
cerr << "Enter password: ";
|
||||
getline(cin, password);
|
||||
std::getline(std::cin, password);
|
||||
got_password = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ write(ostream &out, int indent_level) const {
|
|||
PT(EggCoordinateSystem) ecs = new EggCoordinateSystem(_coordsys);
|
||||
ecs->write(out, indent_level);
|
||||
EggGroupNode::write(out, indent_level);
|
||||
out << flush;
|
||||
out << std::flush;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ has_texture() const {
|
|||
INLINE bool EggPrimitive::
|
||||
has_texture(EggTexture *texture) const {
|
||||
PT_EggTexture t = texture;
|
||||
return (::find(_textures.begin(), _textures.end(), t) != _textures.end());
|
||||
return (std::find(_textures.begin(), _textures.end(), t) != _textures.end());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ erase(iterator first, iterator last) {
|
|||
EggPrimitive::iterator EggPrimitive::
|
||||
find(EggVertex *vertex) {
|
||||
PT_EggVertex vpt = vertex;
|
||||
return ::find(begin(), end(), vpt);
|
||||
return std::find(begin(), end(), vpt);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -670,7 +670,7 @@ add_vertex(EggVertex *vertex) {
|
|||
EggVertex *EggPrimitive::
|
||||
remove_vertex(EggVertex *vertex) {
|
||||
PT_EggVertex vpt = vertex;
|
||||
iterator i = ::find(begin(), end(), vpt);
|
||||
iterator i = std::find(begin(), end(), vpt);
|
||||
if (i == end()) {
|
||||
return PT_EggVertex();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ split_vertex(EggVertex *vert, const FunctionObject &sequence) {
|
|||
typedef pvector<EggPrimitive *> Prims;
|
||||
Prims prims;
|
||||
prims.reserve(vert->pref_size());
|
||||
copy(vert->pref_begin(), vert->pref_end(), back_inserter(prims));
|
||||
std::copy(vert->pref_begin(), vert->pref_end(), std::back_inserter(prims));
|
||||
|
||||
// Now walk through the list of primitives that reference this vertex.
|
||||
Prims::const_iterator pri;
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ transform(const LMatrix4d &mat) {
|
|||
typedef pvector<EggVertex *> Verts;
|
||||
Verts verts;
|
||||
verts.reserve(size());
|
||||
copy(begin(), end(), back_inserter(verts));
|
||||
std::copy(begin(), end(), std::back_inserter(verts));
|
||||
|
||||
Verts::const_iterator vi;
|
||||
for (vi = verts.begin(); vi != verts.end(); ++vi) {
|
||||
|
|
@ -742,7 +742,7 @@ sort_by_external_index() {
|
|||
sorted_vertices.push_back(*i);
|
||||
}
|
||||
|
||||
::sort(sorted_vertices.begin(), sorted_vertices.end(), SortByExternalIndex());
|
||||
std::sort(sorted_vertices.begin(), sorted_vertices.end(), SortByExternalIndex());
|
||||
|
||||
// Now reassign the indices, and copy them into a new index map.
|
||||
IndexVertices new_index_vertices;
|
||||
|
|
|
|||
|
|
@ -1062,11 +1062,11 @@ eggyyerror(const string &msg) {
|
|||
}
|
||||
out
|
||||
<< " at line " << line_number << ", column " << col_number << ":\n"
|
||||
<< setiosflags(Notify::get_literal_flag())
|
||||
<< std::setiosflags(Notify::get_literal_flag())
|
||||
<< current_line << "\n";
|
||||
indent(out, col_number-1)
|
||||
<< "^\n" << msg << "\n\n"
|
||||
<< resetiosflags(Notify::get_literal_flag()) << flush;
|
||||
<< std::resetiosflags(Notify::get_literal_flag()) << std::flush;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
|
|
@ -1088,11 +1088,11 @@ eggyywarning(const string &msg) {
|
|||
}
|
||||
out
|
||||
<< " at line " << line_number << ", column " << col_number << ":\n"
|
||||
<< setiosflags(Notify::get_literal_flag())
|
||||
<< std::setiosflags(Notify::get_literal_flag())
|
||||
<< current_line << "\n";
|
||||
indent(out, col_number-1)
|
||||
<< "^\n" << msg << "\n\n"
|
||||
<< resetiosflags(Notify::get_literal_flag()) << flush;
|
||||
<< std::resetiosflags(Notify::get_literal_flag()) << std::flush;
|
||||
}
|
||||
warning_count++;
|
||||
}
|
||||
|
|
@ -1215,7 +1215,7 @@ eat_c_comment() {
|
|||
ostringstream errmsg;
|
||||
errmsg << "This comment contains a nested /* symbol at line "
|
||||
<< line << ", column " << col-1 << "--possibly unclosed?"
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyywarning(errmsg);
|
||||
}
|
||||
last_c = c;
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@ eggyyerror(const string &msg) {
|
|||
}
|
||||
out
|
||||
<< " at line " << line_number << ", column " << col_number << ":\n"
|
||||
<< setiosflags(Notify::get_literal_flag())
|
||||
<< std::setiosflags(Notify::get_literal_flag())
|
||||
<< current_line << "\n";
|
||||
indent(out, col_number-1)
|
||||
<< "^\n" << msg << "\n\n"
|
||||
<< resetiosflags(Notify::get_literal_flag()) << flush;
|
||||
<< std::resetiosflags(Notify::get_literal_flag()) << std::flush;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
|
|
@ -143,11 +143,11 @@ eggyywarning(const string &msg) {
|
|||
}
|
||||
out
|
||||
<< " at line " << line_number << ", column " << col_number << ":\n"
|
||||
<< setiosflags(Notify::get_literal_flag())
|
||||
<< std::setiosflags(Notify::get_literal_flag())
|
||||
<< current_line << "\n";
|
||||
indent(out, col_number-1)
|
||||
<< "^\n" << msg << "\n\n"
|
||||
<< resetiosflags(Notify::get_literal_flag()) << flush;
|
||||
<< std::resetiosflags(Notify::get_literal_flag()) << std::flush;
|
||||
}
|
||||
warning_count++;
|
||||
}
|
||||
|
|
@ -270,7 +270,7 @@ eat_c_comment() {
|
|||
ostringstream errmsg;
|
||||
errmsg << "This comment contains a nested /* symbol at line "
|
||||
<< line << ", column " << col-1 << "--possibly unclosed?"
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyywarning(errmsg);
|
||||
}
|
||||
last_c = c;
|
||||
|
|
|
|||
|
|
@ -3137,14 +3137,14 @@ yyreduce:
|
|||
if (vertex_index < 0) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "Ignoring invalid vertex index " << vertex_index
|
||||
<< " in vertex pool " << pool->get_name() << ends;
|
||||
<< " in vertex pool " << pool->get_name() << std::ends;
|
||||
eggyywarning(errmsg);
|
||||
vertex_index = -1;
|
||||
|
||||
} else if (pool->has_vertex(vertex_index)) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "Ignoring duplicate vertex index " << vertex_index
|
||||
<< " in vertex pool " << pool->get_name() << ends;
|
||||
<< " in vertex pool " << pool->get_name() << std::ends;
|
||||
eggyywarning(errmsg);
|
||||
vertex_index = -1;
|
||||
}
|
||||
|
|
@ -4055,7 +4055,7 @@ yyreduce:
|
|||
if (vertex == NULL) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "No vertex " << index << " in pool " << pool->get_name()
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyyerror(errmsg);
|
||||
} else {
|
||||
group->ref_vertex(vertex, membership);
|
||||
|
|
@ -4659,7 +4659,7 @@ yyreduce:
|
|||
if (vertex == NULL) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "No vertex " << index << " in pool " << pool->get_name()
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyyerror(errmsg);
|
||||
} else {
|
||||
prim->add_vertex(vertex);
|
||||
|
|
|
|||
|
|
@ -971,14 +971,14 @@ vertex:
|
|||
if (vertex_index < 0) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "Ignoring invalid vertex index " << vertex_index
|
||||
<< " in vertex pool " << pool->get_name() << ends;
|
||||
<< " in vertex pool " << pool->get_name() << std::ends;
|
||||
eggyywarning(errmsg);
|
||||
vertex_index = -1;
|
||||
|
||||
} else if (pool->has_vertex(vertex_index)) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "Ignoring duplicate vertex index " << vertex_index
|
||||
<< " in vertex pool " << pool->get_name() << ends;
|
||||
<< " in vertex pool " << pool->get_name() << std::ends;
|
||||
eggyywarning(errmsg);
|
||||
vertex_index = -1;
|
||||
}
|
||||
|
|
@ -1797,7 +1797,7 @@ group_vertex_ref:
|
|||
if (vertex == NULL) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "No vertex " << index << " in pool " << pool->get_name()
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyyerror(errmsg);
|
||||
} else {
|
||||
group->ref_vertex(vertex, membership);
|
||||
|
|
@ -2477,7 +2477,7 @@ primitive_vertex_ref:
|
|||
if (vertex == NULL) {
|
||||
ostringstream errmsg;
|
||||
errmsg << "No vertex " << index << " in pool " << pool->get_name()
|
||||
<< ends;
|
||||
<< std::ends;
|
||||
eggyyerror(errmsg);
|
||||
} else {
|
||||
prim->add_vertex(vertex);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ get_result(TypedObject *&ptr, ReferenceCount *&ref_ptr) const {
|
|||
* Sets this future's result. Can only be called if done() returns false.
|
||||
*/
|
||||
INLINE void AsyncFuture::
|
||||
set_result(nullptr_t) {
|
||||
set_result(std::nullptr_t) {
|
||||
set_result(nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ PUBLISHED:
|
|||
BLOCKING void wait();
|
||||
BLOCKING void wait(double timeout);
|
||||
|
||||
INLINE void set_result(nullptr_t);
|
||||
INLINE void set_result(std::nullptr_t);
|
||||
INLINE void set_result(TypedObject *result);
|
||||
INLINE void set_result(TypedReferenceCount *result);
|
||||
INLINE void set_result(TypedWritableReferenceCount *result);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
class EXPCL_PANDA_EVENT EventParameter {
|
||||
PUBLISHED:
|
||||
INLINE EventParameter() = default;
|
||||
INLINE EventParameter(nullptr_t) {};
|
||||
INLINE EventParameter(std::nullptr_t) {};
|
||||
INLINE EventParameter(const TypedWritableReferenceCount *ptr);
|
||||
INLINE EventParameter(const TypedReferenceCount *ptr);
|
||||
INLINE EventParameter(int value);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ output_hex(ostream &out) const {
|
|||
*/
|
||||
void HashVal::
|
||||
input_hex(istream &in) {
|
||||
in >> ws;
|
||||
in >> std::ws;
|
||||
char buffer[32];
|
||||
size_t i = 0;
|
||||
int ch = in.get();
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
// Now write the data to the .c file, in a compilable form, similar to
|
||||
// bin2c.
|
||||
ofstream out;
|
||||
std::ofstream out;
|
||||
Filename target = Filename::text_filename(string(target_filename));
|
||||
if (!target.open_write(out)) {
|
||||
cerr << "Couldn't open " << target_filename << " for writing.\n";
|
||||
|
|
|
|||
|
|
@ -156,12 +156,12 @@ private:
|
|||
* one pointer or the other. We don't store an entry for an object's
|
||||
* TypedObject pointer.
|
||||
*/
|
||||
typedef map<void *, MemoryInfo *> Table;
|
||||
typedef std::map<void *, MemoryInfo *> Table;
|
||||
Table _table;
|
||||
|
||||
// This table indexes the individual MemoryInfo objects, for unique
|
||||
// iteration.
|
||||
typedef set<MemoryInfo *> InfoSet;
|
||||
typedef std::set<MemoryInfo *> InfoSet;
|
||||
InfoSet _info_set;
|
||||
bool _info_set_dirty;
|
||||
|
||||
|
|
|
|||
|
|
@ -1296,7 +1296,7 @@ repack() {
|
|||
}
|
||||
_removed_subfiles.clear();
|
||||
_new_subfiles.clear();
|
||||
copy(_subfiles.begin(), _subfiles.end(), back_inserter(_new_subfiles));
|
||||
std::copy(_subfiles.begin(), _subfiles.end(), std::back_inserter(_new_subfiles));
|
||||
_next_index = 0;
|
||||
_last_index = 0;
|
||||
_last_data_byte = 0;
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ template<class Key, class Compare, class Vector>
|
|||
INLINE void ordered_vector<Key, Compare, Vector>::
|
||||
sort_nonunique() {
|
||||
TAU_PROFILE("ordered_vector::sort_nonunique()", " ", TAU_USER);
|
||||
stable_sort(begin(), end(), _compare);
|
||||
std::stable_sort(begin(), end(), _compare);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "pmap.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// See ProfileTimer.h for documentation.
|
||||
|
||||
|
||||
|
|
@ -120,13 +118,13 @@ consolidateTo(ostream &out) const {
|
|||
{
|
||||
pmap<string, double>::const_iterator i=entries.begin();
|
||||
for (;i!=entries.end(); ++i) {
|
||||
out << " " << setw(50) << i->first << ": "
|
||||
<< setiosflags(ios::fixed) << setprecision(6) << setw(10) << i->second << "\n";
|
||||
out << " " << std::setw(50) << i->first << ": "
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(6) << std::setw(10) << i->second << "\n";
|
||||
total+=i->second;
|
||||
}
|
||||
}
|
||||
out << "\n [Total Time: "
|
||||
<< setiosflags(ios::fixed) << setprecision(6) << total
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(6) << total
|
||||
<< " seconds]\n"
|
||||
<< "-------------------------------------------------------------------\n";
|
||||
out << endl;
|
||||
|
|
@ -150,12 +148,12 @@ printTo(ostream &out) const {
|
|||
int i;
|
||||
for (i=0; i<_entryCount; ++i) {
|
||||
TimerEntry& te=_entries[i];
|
||||
out << " " << setw(50) << te._tag << ": "
|
||||
<< setiosflags(ios::fixed) << setprecision(6) << setw(10) << te._time << "\n";
|
||||
out << " " << std::setw(50) << te._tag << ": "
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(6) << std::setw(10) << te._time << "\n";
|
||||
total+=te._time;
|
||||
}
|
||||
out << "\n [Total Time: "
|
||||
<< setiosflags(ios::fixed) << setprecision(6) << total
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(6) << total
|
||||
<< " seconds]\n"
|
||||
<< "-------------------------------------------------------------------\n";
|
||||
out << endl;
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ scan_directory() const {
|
|||
// Copy the set of nested mount points to a sorted list so we can search it
|
||||
// quickly.
|
||||
ov_set<string> mount_points;
|
||||
copy(mount_points_flat.begin(), mount_points_flat.end(),
|
||||
back_inserter(mount_points));
|
||||
std::copy(mount_points_flat.begin(), mount_points_flat.end(),
|
||||
std::back_inserter(mount_points));
|
||||
mount_points.sort();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ bool VirtualFileMountSystem::
|
|||
create_file(const Filename &file) {
|
||||
Filename pathname(_physical_filename, file);
|
||||
pathname.set_binary();
|
||||
ofstream stream;
|
||||
std::ofstream stream;
|
||||
return pathname.open_write(stream, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ add_callback(WeakPointerCallback *callback, void *data) {
|
|||
// have been deleted in the meantime.
|
||||
bool deleted = was_deleted();
|
||||
if (!deleted) {
|
||||
_callbacks.insert(make_pair(callback, data));
|
||||
_callbacks.insert(std::make_pair(callback, data));
|
||||
}
|
||||
_lock.unlock();
|
||||
|
||||
|
|
|
|||
|
|
@ -2801,7 +2801,7 @@ glsl_report_shader_errors(GLuint shader, Shader::ShaderType type, bool fatal) {
|
|||
// instead of source indices.
|
||||
istringstream log(info_log);
|
||||
string line;
|
||||
while (getline(log, line)) {
|
||||
while (std::getline(log, line)) {
|
||||
int fileno, lineno, colno;
|
||||
int prefixlen = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ get_primitive_type() const {
|
|||
*/
|
||||
CPT(GeomPrimitive) GeomTriangles::
|
||||
make_adjacency() const {
|
||||
using std::make_pair;
|
||||
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
PT(GeomTrianglesAdjacency) adj = new GeomTrianglesAdjacency(get_usage_hint());
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ get_geom_rendering() const {
|
|||
*/
|
||||
CPT(GeomPrimitive) GeomTristrips::
|
||||
make_adjacency() const {
|
||||
using std::make_pair;
|
||||
|
||||
Thread *current_thread = Thread::get_current_thread();
|
||||
PT(GeomTristripsAdjacency) adj = new GeomTristripsAdjacency(get_usage_hint());
|
||||
CPTA_int ends = get_ends();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ make(PyStringObject *str) {
|
|||
Py_INCREF(str);
|
||||
iname->ref();
|
||||
|
||||
InternalName::_py_intern_table.insert(make_pair((PyObject *)str, iname.p()));
|
||||
InternalName::_py_intern_table.insert(std::make_pair((PyObject *)str, iname.p()));
|
||||
return iname.p();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2575,7 +2575,7 @@ r_preprocess_source(ostream &out, const Filename &fn,
|
|||
int ext_google_line = 0;
|
||||
bool had_include = false;
|
||||
int lineno = 0;
|
||||
while (getline(*source, line)) {
|
||||
while (std::getline(*source, line)) {
|
||||
++lineno;
|
||||
|
||||
if (line.empty()) {
|
||||
|
|
@ -2589,7 +2589,7 @@ r_preprocess_source(ostream &out, const Filename &fn,
|
|||
line.resize(line.size() - 1);
|
||||
string line2;
|
||||
|
||||
if (getline(*source, line2)) {
|
||||
if (std::getline(*source, line2)) {
|
||||
line += line2;
|
||||
out.put('\n');
|
||||
++lineno;
|
||||
|
|
@ -2618,7 +2618,7 @@ r_preprocess_source(ostream &out, const Filename &fn,
|
|||
size_t block_end = line2.find("*/");
|
||||
while (block_end == string::npos) {
|
||||
// Didn't find it - look in the next line.
|
||||
if (getline(*source, line2)) {
|
||||
if (std::getline(*source, line2)) {
|
||||
out.put('\n');
|
||||
++lineno;
|
||||
block_end = line2.find("*/");
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ operator >> (istream &in, NetDatagram &datagram) {
|
|||
datagram.clear();
|
||||
|
||||
// First, read a line of text.
|
||||
string line;
|
||||
getline(in, line);
|
||||
std::string line;
|
||||
std::getline(in, line);
|
||||
|
||||
// Now parse the text.
|
||||
size_t p = 0;
|
||||
|
|
@ -74,7 +74,7 @@ operator >> (istream &in, NetDatagram &datagram) {
|
|||
while (p < line.length() && line[p] != '"') {
|
||||
p++;
|
||||
}
|
||||
string str = line.substr(start, p - start);
|
||||
std::string str = line.substr(start, p - start);
|
||||
datagram.add_int8(DE_string);
|
||||
datagram.add_string(str);
|
||||
p++;
|
||||
|
|
@ -85,7 +85,7 @@ operator >> (istream &in, NetDatagram &datagram) {
|
|||
while (p < line.length() && !isspace(line[p])) {
|
||||
p++;
|
||||
}
|
||||
string str = line.substr(start, p - start);
|
||||
std::string str = line.substr(start, p - start);
|
||||
datagram.add_int8(DE_string);
|
||||
datagram.add_string(str);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ main(int argc, char *argv[]) {
|
|||
if (reader.get_data(datagram)) {
|
||||
string data = datagram.get_message();
|
||||
nout.write(data.data(), data.length());
|
||||
nout << flush;
|
||||
nout << std::flush;
|
||||
|
||||
Clients::iterator ci;
|
||||
for (ci = clients.begin(); ci != clients.end(); ++ci) {
|
||||
|
|
|
|||
|
|
@ -505,8 +505,8 @@ compose_off(const RenderAttrib *other) const {
|
|||
|
||||
// Create a new ClipPlaneAttrib that will hold the result.
|
||||
ClipPlaneAttrib *new_attrib = new ClipPlaneAttrib;
|
||||
back_insert_iterator<Planes> result =
|
||||
back_inserter(new_attrib->_on_planes);
|
||||
std::back_insert_iterator<Planes> result =
|
||||
std::back_inserter(new_attrib->_on_planes);
|
||||
|
||||
while (ai != _off_planes.end() &&
|
||||
bi != ta->_off_planes.end()) {
|
||||
|
|
@ -717,8 +717,8 @@ compose_impl(const RenderAttrib *other) const {
|
|||
|
||||
// Create a new ClipPlaneAttrib that will hold the result.
|
||||
ClipPlaneAttrib *new_attrib = new ClipPlaneAttrib;
|
||||
back_insert_iterator<Planes> result =
|
||||
back_inserter(new_attrib->_on_planes);
|
||||
std::back_insert_iterator<Planes> result =
|
||||
std::back_inserter(new_attrib->_on_planes);
|
||||
|
||||
while (ai != _on_planes.end() &&
|
||||
bi != ta->_on_planes.end() &&
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue