Forráskód Böngészése

removed unused getSign()

Nicolas Cannasse 3 éve
szülő
commit
ea6012ab89

+ 0 - 7
hxd/fmt/pak/FileSystem.hx

@@ -89,13 +89,6 @@ private class PakEntry extends FileEntry {
 		FileSeek.seek(pak,file.dataPosition, SeekBegin);
 	}
 
-	override function getSign() {
-		setPos();
-		fs.totalReadBytes += 4;
-		fs.totalReadCount++;
-		return pak.readInt32();
-	}
-
 	override function getBytes() {
 		if( cachedBytes != null )
 			return cachedBytes;

+ 0 - 4
hxd/fs/BytesFileSystem.hx

@@ -18,10 +18,6 @@ class BytesFileEntry extends FileEntry {
 		return fullPath;
 	}
 
-	override function getSign() : Int {
-		return bytes.get(0) | (bytes.get(1) << 8) | (bytes.get(2) << 16) | (bytes.get(3) << 24);
-	}
-
 	override function getBytes() : haxe.io.Bytes {
 		return bytes;
 	}

+ 0 - 16
hxd/fs/EmbedFileSystem.hx

@@ -24,22 +24,6 @@ private class EmbedEntry extends FileEntry {
 		this.data = data;
 	}
 
-	override function getSign() : Int {
-		#if flash
-		var old = bytes == null ? 0 : bytes.position;
-		open();
-		bytes.endian = flash.utils.Endian.LITTLE_ENDIAN;
-		var v = bytes.readUnsignedInt();
-		bytes.position = old;
-		return v;
-		#else
-		var old = readPos;
-		open();
-		readPos = old;
-		return bytes.get(0) | (bytes.get(1) << 8) | (bytes.get(2) << 16) | (bytes.get(3) << 24);
-		#end
-	}
-
 	override function getBytes() : haxe.io.Bytes {
 		#if flash
 		if( data == null )

+ 0 - 3
hxd/fs/FileEntry.hx

@@ -10,9 +10,6 @@ class FileEntry {
 	public var isDirectory(get, never) : Bool;
 	public var isAvailable(get, never) : Bool;
 
-	// first four bytes of the file
-	public function getSign() : Int return 0;
-
 	public function getBytes() : haxe.io.Bytes return null;
 
 	public function getText() return getBytes().toString();

+ 0 - 8
hxd/fs/LocalFileSystem.hx

@@ -20,14 +20,6 @@ class LocalEntry extends FileEntry {
 		this.file = file;
 	}
 
-	override function getSign() : Int {
-		var old = if( fread == null ) -1 else fread.tell();
-		open();
-		var i = fread.readInt32();
-		if( old < 0 ) close() else fread.seek(old, SeekBegin);
-		return i;
-	}
-
 	override function getBytes() : haxe.io.Bytes {
 		return sys.io.File.getBytes(file);
 	}

+ 0 - 2
hxd/fs/MultiFileSystem.hx

@@ -11,8 +11,6 @@ private class MultiFileEntry extends FileEntry {
 		name = el[0].name;
 	}
 
-	override function getSign() : Int return el[0].getSign();
-
 	override function getBytes() : haxe.io.Bytes return el[0].getBytes();
 
 	override function open() el[0].open();