old version of clone method in nextframebuffer

This commit is contained in:
Léo 2021-06-24 00:22:54 +02:00
parent 62fb41a3a2
commit e74903508d

View File

@ -24,20 +24,23 @@ public class nextFrameBuffer {
} }
public void clone(nextFrameBuffer f) { public void clone(nextFrameBuffer f) {
this.current = f.current;
this.next = f.next;
try{
Frame cf = new Frame(); // try{
cf.clone(f.current); // Frame cf = new Frame();
this.current = cf; } // cf.clone(f.current);
catch (NullPointerException n) { // this.current = cf; }
this.current = null; // catch (NullPointerException n) {
this.next = null; // this.current = null;
} // this.next = null;
nextFrameBuffer nfb = new nextFrameBuffer(); // }
try { // nextFrameBuffer nfb = new nextFrameBuffer();
nfb.clone(f.next); // try {
} catch (NullPointerException n) {} // nfb.clone(f.next);
this.next = nfb; // } catch (NullPointerException n) {}
// this.next = nfb;
} }