Remove some dead assigns
This commit is contained in:
parent
f3fe0b6a0b
commit
e552dc4c9c
3 changed files with 4 additions and 8 deletions
|
@ -123,9 +123,7 @@ static inline Vector2D interp(Vector2D p1, Vector2D p2, float t) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLWrapper::DrawDashedLine(Vector2D p1, Vector2D p2, float step) const {
|
void OpenGLWrapper::DrawDashedLine(Vector2D p1, Vector2D p2, float step) const {
|
||||||
float dist = (p2 - p1).Len();
|
step /= (p2 - p1).Len();
|
||||||
step /= dist;
|
|
||||||
dist -= step;
|
|
||||||
for (float t = 0; t < 1.f; t += 2 * step) {
|
for (float t = 0; t < 1.f; t += 2 * step) {
|
||||||
DrawLine(interp(p1, p2, t), interp(p1, p2, t + step));
|
DrawLine(interp(p1, p2, t), interp(p1, p2, t + step));
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,14 +125,13 @@ void AegiVideoFrame::SetTo(const unsigned char *source, unsigned int width, unsi
|
||||||
wxImage AegiVideoFrame::GetImage() const {
|
wxImage AegiVideoFrame::GetImage() const {
|
||||||
unsigned char *buf = (unsigned char*)malloc(w*h*3);
|
unsigned char *buf = (unsigned char*)malloc(w*h*3);
|
||||||
if (!buf) throw std::bad_alloc();
|
if (!buf) throw std::bad_alloc();
|
||||||
const unsigned char *src = data;
|
|
||||||
unsigned char *dst = buf;
|
|
||||||
|
|
||||||
int Bpp = GetBpp();
|
int Bpp = GetBpp();
|
||||||
|
|
||||||
// Convert
|
// Convert
|
||||||
for (unsigned int y=0;y<h;y++) {
|
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;
|
if (flipped) src = data + (h-y-1)*pitch;
|
||||||
else src = data + y*pitch;
|
else src = data + y*pitch;
|
||||||
for (unsigned int x=0;x<w;x++) {
|
for (unsigned int x=0;x<w;x++) {
|
||||||
|
|
|
@ -308,12 +308,11 @@ YUV4MPEGVideoProvider::Y4M_FrameFlags YUV4MPEGVideoProvider::ParseFrameHeader(co
|
||||||
/// can easily be done.
|
/// can easily be done.
|
||||||
int YUV4MPEGVideoProvider::IndexFile() {
|
int YUV4MPEGVideoProvider::IndexFile() {
|
||||||
int framecount = 0;
|
int framecount = 0;
|
||||||
int64_t curpos = ftello(sf);
|
|
||||||
|
|
||||||
// the ParseFileHeader() call in LoadVideo() will already have read
|
// the ParseFileHeader() call in LoadVideo() will already have read
|
||||||
// the file header for us and set the seek position correctly
|
// the file header for us and set the seek position correctly
|
||||||
while (true) {
|
while (true) {
|
||||||
curpos = ftello(sf); // update position
|
int64_t curpos = ftello(sf); // update position
|
||||||
// continue reading headers until no more are found
|
// continue reading headers until no more are found
|
||||||
std::vector<wxString> tags = ReadHeader(curpos, false);
|
std::vector<wxString> tags = ReadHeader(curpos, false);
|
||||||
curpos = ftello(sf);
|
curpos = ftello(sf);
|
||||||
|
|
Loading…
Reference in a new issue