Переглянути джерело

Add <lol/format> to ensure std::format is available

wip/image-kernel
Sam Hocevar 11 місяці тому
джерело
коміт
80f8eb149a
8 змінених файлів з 35 додано та 6 видалено
  1. +6
    -0
      .gitmodules
  2. +1
    -0
      README.md
  3. +1
    -0
      include/lol/3rdparty/fmt
  4. +22
    -0
      include/lol/format
  5. +0
    -1
      include/lol/private/base/string.h
  6. +3
    -3
      include/lol/private/math/matrix.ipp
  7. +1
    -1
      include/lol/private/math/transform.ipp
  8. +1
    -1
      include/lol/private/math/vector.ipp

+ 6
- 0
.gitmodules Переглянути файл

@@ -31,3 +31,9 @@
branch = lol
update = merge
upstream = https://github.com/CLIUtils/CLI11

[submodule "include/lol/3rdparty/fmt"]
path = include/lol/3rdparty/fmt
url = https://github.com/fmtlib/fmt
branch = master
update = merge

+ 1
- 0
README.md Переглянути файл

@@ -28,6 +28,7 @@ The header-only part of the Lol Engine framework.
| `<lol/cli>` | command-line parsing (imported from [cliutils/cli11](https://github.com/CLIUtils/CLI11)) | |
| `<lol/dialogs>` | portable file dialogs (imported from [samhocevar/portable-file-dialogs](https://github.com/samhocevar/portable-file-dialogs)) | |
| `<lol/file>` | file reading utilities | ● `lol::read(filename, data)` for any `std::string` or `std::vector`<br>● `lol::write(filename, data)` |
| `<lol/format>` | ensure `std::format` is available, using a fallback if necessary | |
| `<lol/msg>` | simple message logging | ● `lol::msg::info("hello\n");`<br>● `lol::msg::debug("%d %d\n", x, y);`<br>● also `lol::msg::error`, `lol::msg::warn` |
| `<lol/thread>` | threading and timing | ● `lol::thread`<br>● `lol::queue<int, 200>` (thread-safe FIFO queue)<br>● `lol::timer` (high precision timer) |
| `<lol/unit_test>` | unit test framework | |


+ 1
- 0
include/lol/3rdparty/fmt

@@ -0,0 +1 @@
Subproject commit 71a4a8d47999e95f5e460eaf8cec894f60354a13

+ 22
- 0
include/lol/format Переглянути файл

@@ -0,0 +1,22 @@
//
// Lol Engine
//
// Copyright © 2010–2024 Sam Hocevar <sam@hocevar.net>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published by the WTFPL Task Force.
// See http://www.wtfpl.net/ for more details.
//

#pragma once

#include <version>
#if defined _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
# define FMT_HEADER_ONLY
# include "3rdparty/fmt/include/fmt/format.h"
namespace std { using fmt::format; }
#else
# include <format>
#endif

+ 0
- 1
include/lol/private/base/string.h Переглянути файл

@@ -21,7 +21,6 @@

#include "../features.h"

#include <format> // std::format
#include <vector> // std::vector
#include <string> // std::basic_string
#include <algorithm> // std::transform


+ 3
- 3
include/lol/private/math/matrix.ipp Переглянути файл

@@ -13,9 +13,9 @@
#pragma once

#include <cassert>
#include <cmath> // std::tan
#include <algorithm> // std::max
#include <format> // std::format
#include <cmath> // std::tan
#include <algorithm> // std::max
#include <lol/format> // std::format

namespace lol
{


+ 1
- 1
include/lol/private/math/transform.ipp Переглянути файл

@@ -13,7 +13,7 @@
#pragma once

#include <cmath> // std::cos, std::sin
#include <format> // std::format
#include <lol/format> // std::format

namespace lol
{


+ 1
- 1
include/lol/private/math/vector.ipp Переглянути файл

@@ -12,7 +12,7 @@

#pragma once

#include <format> // std::format
#include <lol/format> // std::format

namespace lol
{


Завантаження…
Відмінити
Зберегти