rename 'files' to 'io'
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
#include "files/engine_paths.hpp"
|
||||
#include "files/files.hpp"
|
||||
#include "io/engine_paths.hpp"
|
||||
#include "io/io.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
|
||||
@@ -22,7 +22,7 @@ void GLSLExtension::setPaths(const ResPaths* paths) {
|
||||
|
||||
void GLSLExtension::loadHeader(const std::string& name) {
|
||||
fs::path file = paths->find("shaders/lib/" + name + ".glsl");
|
||||
std::string source = files::read_string(file);
|
||||
std::string source = io::read_string(file);
|
||||
addHeader(name, "");
|
||||
addHeader(name, process(file, source, true));
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include "graphics/core/ImageData.hpp"
|
||||
#include "files/files.hpp"
|
||||
#include "io/io.hpp"
|
||||
#include "png.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
@@ -41,7 +41,7 @@ std::unique_ptr<ImageData> imageio::read(const fs::path& filename) {
|
||||
"file format is not supported (read): " + filename.u8string()
|
||||
);
|
||||
}
|
||||
auto bytes = files::read_bytes_buffer(filename);
|
||||
auto bytes = io::read_bytes_buffer(filename);
|
||||
try {
|
||||
return std::unique_ptr<ImageData>(found->second(bytes.data(), bytes.size()));
|
||||
} catch (const std::runtime_error& err) {
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "debug/Logger.hpp"
|
||||
#include "files/files.hpp"
|
||||
#include "io/io.hpp"
|
||||
#include "graphics/core/GLTexture.hpp"
|
||||
#include "graphics/core/ImageData.hpp"
|
||||
|
||||
@@ -212,7 +212,7 @@ std::unique_ptr<Texture> png::load_texture(const ubyte* bytes, size_t size) {
|
||||
}
|
||||
|
||||
std::unique_ptr<Texture> png::load_texture(const std::string& filename) {
|
||||
auto bytes = files::read_bytes_buffer(fs::u8path(filename));
|
||||
auto bytes = io::read_bytes_buffer(fs::u8path(filename));
|
||||
try {
|
||||
return load_texture(bytes.data(), bytes.size());
|
||||
} catch (const std::runtime_error& err) {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "data/setting.hpp"
|
||||
#include "files/settings_io.hpp"
|
||||
#include "io/settings_io.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
#include "commons.hpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user