Remove some dead assigns

This commit is contained in:
Thomas Goyne 2012-09-14 07:55:01 -07:00
parent f3fe0b6a0b
commit e552dc4c9c
3 changed files with 4 additions and 8 deletions

View file

@ -123,9 +123,7 @@ static inline Vector2D interp(Vector2D p1, Vector2D p2, float t) {
}
void OpenGLWrapper::DrawDashedLine(Vector2D p1, Vector2D p2, float step) const {
float dist = (p2 - p1).Len();
step /= dist;
dist -= step;
step /= (p2 - p1).Len();
for (float t = 0; t < 1.f; t += 2 * step) {
DrawLine(interp(p1, p2, t), interp(p1, p2, t + step));
}

View file

@ -125,14 +125,13 @@ void AegiVideoFrame::SetTo(const unsigned char *source, unsigned int width, unsi
wxImage AegiVideoFrame::GetImage() const {
unsigned char *buf = (unsigned char*)malloc(w*h*3);
if (!buf) throw std::bad_alloc();
const unsigned char *src = data;
unsigned char *dst = buf;
int Bpp = GetBpp();
// Convert
for (unsigned int y=0;y<h;y++) {
dst = buf + y*w*3;
unsigned char *dst = buf + y*w*3;
const unsigned char *src;
if (flipped) src = data + (h-y-1)*pitch;
else src = data + y*pitch;
for (unsigned int x=0;x<w;x++) {

View file

@ -308,12 +308,11 @@ YUV4MPEGVideoProvider::Y4M_FrameFlags YUV4MPEGVideoProvider::ParseFrameHeader(co
/// can easily be done.
int YUV4MPEGVideoProvider::IndexFile() {
int framecount = 0;
int64_t curpos = ftello(sf);
// the ParseFileHeader() call in LoadVideo() will already have read
// the file header for us and set the seek position correctly
while (true) {
curpos = ftello(sf); // update position
int64_t curpos = ftello(sf); // update position
// continue reading headers until no more are found
std::vector<wxString> tags = ReadHeader(curpos, false);
curpos = ftello(sf);