quiet some compiler warnings

pull/1344/head
phkahler 2023-01-31 22:13:15 -05:00 committed by Paul Kahler
parent e4fcb7de08
commit 302aebfd1a
4 changed files with 6 additions and 4 deletions

View File

@ -186,7 +186,7 @@ void GraphicsWindow::MakeSelected(Selection *stog) {
if(stog->entity.v != 0 && SK.GetEntity(stog->entity)->IsFace()) {
// In the interest of speed for the triangle drawing code,
// only MAX_SELECTABLE_FACES faces may be selected at a time.
int c = 0;
unsigned int c = 0;
Selection *s;
selection.ClearTags();
for(s = selection.First(); s; s = selection.NextAfter(s)) {

View File

@ -824,7 +824,7 @@ Vector GraphicsWindow::SnapToEntityByScreenPoint(Point2d pp, hEntity he) {
SEdgeList *edges = e->GetOrGenerateEdges();
double minD = -1.0f;
double k;
double k = 0.0;
const SEdge *edge = NULL;
for(const auto &e : edges->l) {
Point2d p0 = ProjectPoint(e.a);

View File

@ -273,8 +273,8 @@ std::shared_ptr<Pixmap> Pixmap::ReadPng(const Platform::Path &filename, bool fli
}
bool Pixmap::WritePng(FILE *f, bool flip) {
int colorType = 0;
bool bgr = false;
colorType = 0;
bgr = false;
switch(format) {
case Format::RGBA: colorType = PNG_COLOR_TYPE_RGBA; bgr = false; break;
case Format::BGRA: colorType = PNG_COLOR_TYPE_RGBA; bgr = true; break;

View File

@ -38,6 +38,8 @@ public:
size_t height;
size_t stride;
std::vector<uint8_t> data;
int colorType;
bool bgr;
static std::shared_ptr<Pixmap> Create(Format format, size_t width, size_t height);
static std::shared_ptr<Pixmap> FromPng(const uint8_t *data, size_t size, bool flip = false);