mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
pnmimagetypes: Remove vestigial init_pnm() call
This commit is contained in:
parent
492cce8a49
commit
3052bcf289
@ -20,7 +20,6 @@
|
||||
|
||||
using std::string;
|
||||
|
||||
bool PNMFileType::_did_init_pnm = false;
|
||||
TypeHandle PNMFileType::_type_handle;
|
||||
|
||||
/**
|
||||
@ -107,21 +106,6 @@ make_writer(std::ostream *, bool) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the underlying PNM library, if it has not already been
|
||||
* initialized. This should be called by every implementation of
|
||||
* make_reader() and make_writer(), to ensure that the library is properly
|
||||
* initialized before any I/O is attempted.
|
||||
*/
|
||||
void PNMFileType::
|
||||
init_pnm() {
|
||||
if (!_did_init_pnm) {
|
||||
_did_init_pnm = true;
|
||||
|
||||
// No reason to do anything here nowadays.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills the indicated datagram up with a binary representation of the current
|
||||
* object, in preparation for writing to a Bam file.
|
||||
|
@ -56,13 +56,6 @@ public:
|
||||
const std::string &magic_number = std::string());
|
||||
virtual PNMWriter *make_writer(std::ostream *file, bool owns_file = true);
|
||||
|
||||
protected:
|
||||
static void init_pnm();
|
||||
|
||||
private:
|
||||
static bool _did_init_pnm;
|
||||
|
||||
|
||||
// The TypedWritable interface follows.
|
||||
public:
|
||||
static void register_with_read_factory();
|
||||
|
@ -99,7 +99,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeBMP::
|
||||
make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -110,7 +109,6 @@ make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeBMP::
|
||||
make_writer(std::ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeEXR::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -191,7 +190,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeEXR::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,6 @@ get_suggested_extension() const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeIMG::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -97,7 +96,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeIMG::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeJPG::
|
||||
make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -111,7 +110,6 @@ make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeJPG::
|
||||
make_writer(std::ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypePNG::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -133,7 +132,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypePNG::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -1027,7 +1027,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypePNM::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -1038,7 +1037,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypePNM::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeSGI::
|
||||
make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -114,7 +113,6 @@ make_reader(std::istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeSGI::
|
||||
make_writer(std::ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeSoftImage::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -288,7 +287,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeSoftImage::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeStbImage::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new StbImageReader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,6 @@ get_suggested_extension() const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeTGA::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
|
||||
@ -165,7 +164,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeTGA::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,6 @@ matches_magic_number(const string &magic_number) const {
|
||||
*/
|
||||
PNMReader *PNMFileTypeTIFF::
|
||||
make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
init_pnm();
|
||||
install_error_handlers();
|
||||
return new Reader(this, file, owns_file, magic_number);
|
||||
}
|
||||
@ -304,7 +303,6 @@ make_reader(istream *file, bool owns_file, const string &magic_number) {
|
||||
*/
|
||||
PNMWriter *PNMFileTypeTIFF::
|
||||
make_writer(ostream *file, bool owns_file) {
|
||||
init_pnm();
|
||||
install_error_handlers();
|
||||
return new Writer(this, file, owns_file);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user