Found a duplicate lines of code

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Post Reply
xk82180316
Posts: 2
Joined: Tue Dec 28, 2010 9:53 am

Found a duplicate lines of code

Post by xk82180316 » Thu Dec 30, 2010 10:51 am

ReactOS-0.3.12-REL-src
File:ReactOS\boot\freeldr\freeldr\arch\i386\machpc.c :ugeek:

/* Setup vtbl */
MachVtbl.ConsPutChar = PcConsPutChar;
MachVtbl.ConsKbHit = PcConsKbHit;
MachVtbl.ConsGetCh = PcConsGetCh;
MachVtbl.VideoClearScreen = PcVideoClearScreen;
MachVtbl.VideoSetDisplayMode = PcVideoSetDisplayMode;
MachVtbl.VideoGetDisplaySize = PcVideoGetDisplaySize;
MachVtbl.VideoGetBufferSize = PcVideoGetBufferSize;
35 MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition; // <-this
36 MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition; // <-this

Jobob635
Posts: 6
Joined: Sun Oct 03, 2010 10:45 am

Re: Found a duplicate lines of code

Post by Jobob635 » Sat Jan 01, 2011 12:46 pm

at the bottom, they are the same. But the numbers are differant at the beginning.

bugboy
Developer
Posts: 39
Joined: Thu May 22, 2008 9:23 pm

Re: Found a duplicate lines of code

Post by bugboy » Sat Jan 01, 2011 2:55 pm

Jobob635 wrote:at the bottom, they are the same. But the numbers are differant at the beginning.
LOL.
Image

Jobob635
Posts: 6
Joined: Sun Oct 03, 2010 10:45 am

Re: Found a duplicate lines of code

Post by Jobob635 » Sat Jan 01, 2011 5:33 pm

IKR. :lol:

Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Found a duplicate lines of code

Post by Black_Fox » Sat Jan 08, 2011 9:01 pm

Bump.

Haos
Test Team
Posts: 2954
Joined: Thu Mar 22, 2007 5:42 am
Contact:

Re: Found a duplicate lines of code

Post by Haos » Sat Jan 08, 2011 11:59 pm

Why bumping?? Please let this thread die.

vicmarcal
Test Team
Posts: 2732
Joined: Mon Jul 07, 2008 12:35 pm

Re: Found a duplicate lines of code

Post by vicmarcal » Sun Jan 09, 2011 4:42 pm

Haos wrote:Why bumping?? Please let this thread die.
The duplication exists, shouldnt we delete thatline?i know it is not critical but a waste of cpu cycles :)
Image

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto » Sun Jan 09, 2011 5:18 pm

xk82180316, thanks for the report. The bug is fixed now.

vicmarcal
Test Team
Posts: 2732
Joined: Mon Jul 07, 2008 12:35 pm

Re:

Post by vicmarcal » Sun Jan 09, 2011 5:20 pm

hto wrote:xk82180316, thanks for the report. The bug is fixed now.
Thanks hto :)
Image

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto » Tue Jan 11, 2011 5:03 pm

vicmarcal wrote: The duplication exists, shouldn't we delete that line? I know it is not critical but a waste of cpu cycles :)
It's a very small waste of cycles during compilation, but not at run time. Duplicate code is removed by an optimizer.

What is more important, someone who reads the sources can think that it is a typo — for example, that it should be VideoGetTextCursorPosition instead of VideoSetTextCursorPosition.

Post Reply

Who is online

Users browsing this forum: Yandex [Bot] and 4 guests