mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-06 08:35:26 +00:00
run clang-format to order includes, fix include ordering errors
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
class Biome;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
class EOFException : public std::exception {};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// 4J Stu - Represents java standard library class
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "Reader.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Reader.h"
|
||||
|
||||
class BufferedReader : public Reader {
|
||||
private:
|
||||
Reader* reader;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
// 4J Stu - Represents Java standard library class
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "InputStream.h"
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "OutputStream.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "OutputStream.h"
|
||||
|
||||
class ByteArrayOutputStream : public OutputStream {
|
||||
// Note - when actually implementing, std::vector<uint8_t> will need to grow
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class DataInput {
|
||||
public:
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// 4J Stu - Represents Java standard library class (although we miss out an
|
||||
// intermediate inheritance class that we don't care about)
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "InputStream.h"
|
||||
#include "DataInput.h"
|
||||
#include "InputStream.h"
|
||||
|
||||
class DataInputStream : public InputStream, public DataInput {
|
||||
private:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class DataOutput {
|
||||
public:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "OutputStream.h"
|
||||
#include "DataOutput.h"
|
||||
#include "OutputStream.h"
|
||||
|
||||
class DataOutputStream : public OutputStream, public DataOutput {
|
||||
private:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
// 4J Stu - Represents Java standard library class
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
#include "InputStream.h"
|
||||
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "InputStream.h"
|
||||
#include "BufferedOutputStream.h"
|
||||
#include "BufferedReader.h"
|
||||
#include "ByteArrayInputStream.h"
|
||||
#include "ByteArrayOutputStream.h"
|
||||
#include "DataInput.h"
|
||||
#include "DataInputStream.h"
|
||||
#include "FileInputStream.h"
|
||||
#include "GZIPInputStream.h"
|
||||
|
||||
#include "OutputStream.h"
|
||||
#include "ByteArrayOutputStream.h"
|
||||
#include "DataOutput.h"
|
||||
#include "BufferedOutputStream.h"
|
||||
#include "DataOutputStream.h"
|
||||
#include "FileInputStream.h"
|
||||
#include "FileOutputStream.h"
|
||||
#include "GZIPInputStream.h"
|
||||
#include "GZIPOutputStream.h"
|
||||
|
||||
#include "Reader.h"
|
||||
#include "BufferedReader.h"
|
||||
#include "InputStreamReader.h"
|
||||
#include "InputStream.h"
|
||||
#include "InputStreamReader.h"
|
||||
#include "OutputStream.h"
|
||||
#include "Reader.h"
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// 4J Stu - Represents Java standard lib abstract
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Reader.h"
|
||||
#include "DataInputStream.h"
|
||||
#include "Reader.h"
|
||||
|
||||
class InputStream;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
// 4J Stu - Represents Java standard lib abstract
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "java/Class.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "java/Class.h"
|
||||
|
||||
// Java doesn't have a default hash value for ints, however, the hashmap itself
|
||||
// does some "supplemental" hashing, so our ints actually get hashed by code as
|
||||
// implemented below. std templates *do* have a standard hash for ints, but it
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
class Biome;
|
||||
class Node;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "java/Buffer.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
Buffer::Buffer(unsigned int capacity)
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
|
||||
#include "java/ByteBuffer.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "java/IntBuffer.h"
|
||||
#include "java/FloatBuffer.h"
|
||||
#include "java/ByteBuffer.h"
|
||||
#include "java/Buffer.h"
|
||||
#include "java/FloatBuffer.h"
|
||||
#include "java/IntBuffer.h"
|
||||
|
||||
ByteBuffer::ByteBuffer(unsigned int capacity) : Buffer(capacity) {
|
||||
hasBackingArray = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "java/Color.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include "java/Color.h"
|
||||
|
||||
// Creates an opaque sRGB color with the specified red, green, and blue values
|
||||
// in the range (0.0 - 1.0). Alpha is defaulted to 1.0. The actual color used in
|
||||
// rendering depends on finding the best match given the color space available
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
#include "java/File.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
#include <vector>
|
||||
|
||||
#include "java/FileFilter.h"
|
||||
#include "java/File.h"
|
||||
#include "console_helpers/PathHelper.h" // 4jcraft TODO
|
||||
#include "console_helpers/StringHelpers.h" // 4jcraft TODO
|
||||
#include "java/FileFilter.h"
|
||||
|
||||
const wchar_t File::pathSeparator = L'/';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "java/InputOutputStream/BufferedReader.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
// Creates a buffering character-input stream that uses a default-sized input
|
||||
// buffer. Parameters: in - A Reader
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
// mark is set to the specified offset. Parameters: buf - the input buffer.
|
||||
// offset - the offset in the buffer of the first byte to read.
|
||||
// length - the maximum number of bytes to read from the buffer.
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "java/InputOutputStream/ByteArrayInputStream.h"
|
||||
|
||||
ByteArrayInputStream::ByteArrayInputStream(std::vector<uint8_t>& buf,
|
||||
unsigned int offset,
|
||||
unsigned int length)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <bit>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
|
||||
// Creates a DataInputStream that uses the specified underlying InputStream.
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <bit>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
#include "java/InputOutputStream/OutputStream.h"
|
||||
|
||||
// Creates a new data output stream to write data to the specified underlying
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
|
||||
#include "java/InputOutputStream/FileInputStream.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/FileInputStream.h"
|
||||
#include "console_helpers/StringHelpers.h"
|
||||
#include "java/File.h"
|
||||
|
||||
namespace {
|
||||
int64_t FileTell(std::FILE* file) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "java/InputOutputStream/FileOutputStream.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/FileOutputStream.h"
|
||||
|
||||
#include "console_helpers/StringHelpers.h" // 4jcraft TODO
|
||||
#include "java/File.h"
|
||||
|
||||
// Creates a file output stream to write to the file represented by the
|
||||
// specified File object. A new FileDescriptor object is created to represent
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
#include "java/InputOutputStream/FileInputStream.h"
|
||||
|
||||
InputStream* InputStream::getResourceAsStream(const std::wstring& fileName) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/InputStreamReader.h"
|
||||
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
|
||||
class InputStream;
|
||||
|
||||
// Creates an InputStreamReader that uses the default charset.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "java/Buffer.h"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <chrono>
|
||||
#include <cstdint> // for int64_t
|
||||
|
||||
#include "java/Random.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <cstdint> // for int64_t
|
||||
|
||||
Random::Random() {
|
||||
// 4J - jave now uses the system nanosecond counter added to a
|
||||
// "seedUniquifier" to get an initial seed. Our nanosecond timer is actually
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <chrono>
|
||||
#include "java/System.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "java/System.h"
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
|
||||
class Biome;
|
||||
class Node;
|
||||
|
||||
Reference in New Issue
Block a user