forked from bartvdbraak/blender
Code cleanup: silence some -Wnarrowing warnings from C++11
This commit is contained in:
parent
2fcd6827bf
commit
cad8609172
@ -209,7 +209,7 @@ void CameraIntrinsics::ComputeLookupGrid(Grid* grid, int width, int height, doub
|
||||
if( ix >= width-2 ) ix = width-2;
|
||||
if( iy >= height-2 ) iy = height-2;
|
||||
|
||||
Offset offset = { ix-x, iy-y, fx, fy };
|
||||
Offset offset = { (short)(ix-x), (short)(iy-y), (unsigned char)fx, (unsigned char)fy };
|
||||
grid->offset[y*width+x] = offset;
|
||||
}
|
||||
}
|
||||
|
4
extern/libmv/libmv/simple_pipeline/detect.cc
vendored
4
extern/libmv/libmv/simple_pipeline/detect.cc
vendored
@ -66,7 +66,7 @@ std::vector<Feature> DetectFAST(const unsigned char* data, int width, int height
|
||||
Feature *all_features = new Feature[num_features];
|
||||
|
||||
for(int i = 0; i < num_features; ++i) {
|
||||
Feature a = { nonmax[i].x, nonmax[i].y, scores[i], 0 };
|
||||
Feature a = { (float)nonmax[i].x, (float)nonmax[i].y, (float)scores[i], 0 };
|
||||
all_features[i] = a;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ void DetectMORAVEC(ubyte* image, int stride, int width, int height, Feature* det
|
||||
for(int y=16; y<height-16; y++) {
|
||||
for(int x=16; x<width-16; x++) {
|
||||
int s = scores[y*width+x];
|
||||
Feature f = { x+8, y+8, s, 16 };
|
||||
Feature f = { (float)x+8.0f, (float)y+8.0f, (float)s, 16 };
|
||||
if(s>min) detected[i++] = f;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user