mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-07-30 16:26:28 +08:00
🎨 Committing clang-format changes
This commit is contained in:
parent
56506bc111
commit
d3c94e4451
@ -81,10 +81,10 @@ namespace chaiscript {
|
|||||||
|
|
||||||
template<typename Callable, typename Ret, typename... Params, size_t... I>
|
template<typename Callable, typename Ret, typename... Params, size_t... I>
|
||||||
Ret call_func_impl(Ret (*)(Params...),
|
Ret call_func_impl(Ret (*)(Params...),
|
||||||
std::index_sequence<I...>,
|
std::index_sequence<I...>,
|
||||||
const Callable &f,
|
const Callable &f,
|
||||||
[[maybe_unused]] const chaiscript::Function_Params ¶ms,
|
[[maybe_unused]] const chaiscript::Function_Params ¶ms,
|
||||||
[[maybe_unused]] const Type_Conversions_State &t_conversions) {
|
[[maybe_unused]] const Type_Conversions_State &t_conversions) {
|
||||||
return f(boxed_cast<Params>(params[I], &t_conversions)...);
|
return f(boxed_cast<Params>(params[I], &t_conversions)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ namespace chaiscript {
|
|||||||
// MSVC has a broken warning for unreachable code in this block
|
// MSVC has a broken warning for unreachable code in this block
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4702)
|
#pragma warning(disable : 4702)
|
||||||
#endif
|
#endif
|
||||||
template<typename Callable, typename... Params>
|
template<typename Callable, typename... Params>
|
||||||
Boxed_Value
|
Boxed_Value
|
||||||
|
|||||||
@ -317,7 +317,7 @@ namespace chaiscript {
|
|||||||
std::vector<std::string> t_module_paths = {},
|
std::vector<std::string> t_module_paths = {},
|
||||||
std::vector<std::string> t_use_paths = {},
|
std::vector<std::string> t_use_paths = {},
|
||||||
const std::vector<chaiscript::Options> &t_opts = chaiscript::default_options(),
|
const std::vector<chaiscript::Options> &t_opts = chaiscript::default_options(),
|
||||||
const bool t_no_io=false)
|
const bool t_no_io = false)
|
||||||
: m_module_paths(ensure_minimum_path_vec(std::move(t_module_paths)))
|
: m_module_paths(ensure_minimum_path_vec(std::move(t_module_paths)))
|
||||||
, m_use_paths(ensure_minimum_path_vec(std::move(t_use_paths)))
|
, m_use_paths(ensure_minimum_path_vec(std::move(t_use_paths)))
|
||||||
, m_parser(std::move(parser))
|
, m_parser(std::move(parser))
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
#include "../chaiscript_defines.hpp"
|
#include "../chaiscript_defines.hpp"
|
||||||
|
|
||||||
#include <iterator>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
namespace chaiscript {
|
namespace chaiscript {
|
||||||
namespace utility {
|
namespace utility {
|
||||||
|
|||||||
@ -126,7 +126,7 @@ namespace chaiscript::json {
|
|||||||
JSONWrapper(Container *val)
|
JSONWrapper(Container *val)
|
||||||
: object(val) {
|
: object(val) {
|
||||||
}
|
}
|
||||||
JSONWrapper(std::nullptr_t) { }
|
JSONWrapper(std::nullptr_t) {}
|
||||||
|
|
||||||
Container::iterator begin() { return object ? object->begin() : typename Container::iterator(); }
|
Container::iterator begin() { return object ? object->begin() : typename Container::iterator(); }
|
||||||
Container::iterator end() { return object ? object->end() : typename Container::iterator(); }
|
Container::iterator end() { return object ? object->end() : typename Container::iterator(); }
|
||||||
|
|||||||
@ -15,7 +15,9 @@ namespace chaiscript {
|
|||||||
|
|
||||||
inline constexpr std::uint32_t max_codepoint = 0x10FFFF;
|
inline constexpr std::uint32_t max_codepoint = 0x10FFFF;
|
||||||
|
|
||||||
constexpr bool is_surrogate(std::uint32_t cp) noexcept { return cp >= 0xD800 && cp <= 0xDFFF; }
|
constexpr bool is_surrogate(std::uint32_t cp) noexcept {
|
||||||
|
return cp >= 0xD800 && cp <= 0xDFFF;
|
||||||
|
}
|
||||||
|
|
||||||
// Append cp to out as UTF-8. Returns bytes written, or 0 if cp >= 0x200000.
|
// Append cp to out as UTF-8. Returns bytes written, or 0 if cp >= 0x200000.
|
||||||
// Surrogates are not rejected here; callers that care check is_surrogate() first.
|
// Surrogates are not rejected here; callers that care check is_surrogate() first.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
|
|
||||||
|
|
||||||
// lambda_tests
|
// lambda_tests
|
||||||
TEST_CASE("C++11 Lambdas Can Be Registered") {
|
TEST_CASE("C++11 Lambdas Can Be Registered") {
|
||||||
// We cannot deduce the type of a lambda expression, you must either wrap it
|
// We cannot deduce the type of a lambda expression, you must either wrap it
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user