Skip to content

Commit 0e2d51b

Browse files
committed
Include functional headers
1 parent bcda7de commit 0e2d51b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
project(imagepp VERSION 0.0.0)
2+
project(imagep VERSION 0.0.0)
33
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate compile_commands.json for ccls
44
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Group CMake targets inside a folder
55

image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace nrv {
1717
image::image(std::filesystem::path const& filename) : m_filename(filename) {
1818
using namespace std::string_literals;
19-
auto data = stbi_load(filename.c_str(), &m_width, &m_height, &m_channels, 0);
19+
auto data = stbi_load(m_filename.string().c_str(), &m_width, &m_height, &m_channels, 0);
2020
if (data == nullptr)
2121
throw std::runtime_error("nrv::image: error reading file: \""s + filename.string() + "\""s);
2222
m_size = static_cast<std::size_t>(m_width * m_height * m_channels);

image.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <cstdint>
1313
#include <filesystem>
1414
#include <string>
15+
#include <functional>
1516

1617
#include "glm/glm.hpp"
1718
#include "glm/vec3.hpp"

0 commit comments

Comments
 (0)