mirror of https://github.com/OpenTTD/OpenTTD
Codechange: provide 'sv' (string_view) literals globally
parent
be53bd320d
commit
8b1c1cc33d
|
@ -73,6 +73,8 @@
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
using namespace std::literals::string_view_literals;
|
||||||
|
|
||||||
#if defined(UNIX) || defined(__MINGW32__)
|
#if defined(UNIX) || defined(__MINGW32__)
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "../core/string_builder.hpp"
|
#include "../core/string_builder.hpp"
|
||||||
#include "../safeguards.h"
|
#include "../safeguards.h"
|
||||||
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
TEST_CASE("StringBuilder - basic")
|
TEST_CASE("StringBuilder - basic")
|
||||||
{
|
{
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#include "../safeguards.h"
|
#include "../safeguards.h"
|
||||||
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
TEST_CASE("StringConsumer - basic")
|
TEST_CASE("StringConsumer - basic")
|
||||||
{
|
{
|
||||||
StringConsumer consumer("ab"sv);
|
StringConsumer consumer("ab"sv);
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include "../core/string_inplace.hpp"
|
#include "../core/string_inplace.hpp"
|
||||||
#include "../safeguards.h"
|
#include "../safeguards.h"
|
||||||
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
TEST_CASE("InPlaceReplacement")
|
TEST_CASE("InPlaceReplacement")
|
||||||
{
|
{
|
||||||
std::array<char, 4> buffer{1, 2, 3, 4};
|
std::array<char, 4> buffer{1, 2, 3, 4};
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
|
|
||||||
#include "../safeguards.h"
|
#include "../safeguards.h"
|
||||||
|
|
||||||
using namespace std::literals;
|
|
||||||
|
|
||||||
TEST_CASE("Utf8View - empty")
|
TEST_CASE("Utf8View - empty")
|
||||||
{
|
{
|
||||||
Utf8View view;
|
Utf8View view;
|
||||||
|
|
Loading…
Reference in New Issue