initialize variables

This commit is contained in:
Konstantin Käfer
2014-02-05 13:59:02 +01:00
parent e97fcda9f3
commit f738a9e19e
2 changed files with 11 additions and 7 deletions

View File

@@ -46,20 +46,24 @@ struct pbf {
inline void skipValue(uint32_t val);
inline void skipBytes(uint32_t bytes);
const uint8_t *data;
const uint8_t *end;
uint32_t value;
uint32_t tag;
const uint8_t *data = NULL;
const uint8_t *end = NULL;
uint32_t value = 0;
uint32_t tag = 0;
};
pbf::pbf(const unsigned char *data, uint32_t length)
: data(data),
end(data + length) {
end(data + length),
value(0),
tag(0) {
}
pbf::pbf()
: data(NULL),
end(NULL) {
end(NULL),
value(0),
tag(0) {
}

View File

@@ -94,7 +94,7 @@ void Map::setScale(double scale) {
}
void Map::setAngle(double angle, double x, double y) {
double dx, dy;
double dx = 0, dy = 0;
if (x >= 0 && y >= 0) {
dx = (transform.width / 2) - x;