From e552dc4c9c2f2956a4e1fc1b60e2aec0e3ebf532 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 14 Sep 2012 07:55:01 -0700 Subject: [PATCH] Remove some dead assigns --- aegisub/src/gl_wrap.cpp | 4 +--- aegisub/src/video_frame.cpp | 5 ++--- aegisub/src/video_provider_yuv4mpeg.cpp | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/aegisub/src/gl_wrap.cpp b/aegisub/src/gl_wrap.cpp index a052138c6..f2aa395f8 100644 --- a/aegisub/src/gl_wrap.cpp +++ b/aegisub/src/gl_wrap.cpp @@ -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)); } diff --git a/aegisub/src/video_frame.cpp b/aegisub/src/video_frame.cpp index 6f9f3ea29..f68f9a3cd 100644 --- a/aegisub/src/video_frame.cpp +++ b/aegisub/src/video_frame.cpp @@ -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 tags = ReadHeader(curpos, false); curpos = ftello(sf);