*** empty log message ***

This commit is contained in:
David Rose 2000-12-08 00:42:21 +00:00
parent 995bbe1ceb
commit 25fd0d0c3a

View File

@ -186,20 +186,24 @@ get_page() const {
// Function: PaletteImage::is_empty // Function: PaletteImage::is_empty
// Access: Public // Access: Public
// Description: Returns true if there are no textures, or only one // Description: Returns true if there are no textures, or only one
// texture, placed on the image. In either case, the // "solitary" texture, placed on the image. In either
// PaletteImage need not be generated. // case, the PaletteImage need not be generated.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
bool PaletteImage:: bool PaletteImage::
is_empty() const { is_empty() const {
if (pal->_omit_solitary) { if (_placements.empty()) {
// If we're omitting solitary textures, the image is considered // The image is genuinely empty.
// empty even if it has one texture. return true;
return _placements.size() < 2;
} else if (_placements.size() == 1) {
// If the image has exactly one texture, we consider the image
// empty only if the texture is actually flagged as 'solitary'.
return (_placements[0]->get_omit_reason() == OR_solitary);
} else { } else {
// If we're not omitting solitary textures, the image is only // The image has more than one texture, so it's definitely not
// empty if it has no textures. // empty.
return _placements.empty(); return false;
} }
} }