-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5dc9c4c
commit b13cfe3
Showing
12 changed files
with
64 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Dots
updated
4 files
+1 −0 | Dots/CDatabase.h | |
+1 −1 | Dots/ChunkVector.h | |
+14 −10 | Dots/Database.cpp | |
+1 −1 | DotsRuntime/DotsRuntime.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
SakuraEngine/Source/Runtime/RuntimeCore/Include/SakuraSTL/string.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
#include "Base/Definations.h" | ||
#include <string> | ||
#include <string_view> | ||
|
||
#ifdef WHEN_PMR_IS_USABLE | ||
#include <memory_resource> | ||
namespace sakura | ||
{ | ||
using std::pmr::string; | ||
using std::pmr::wstring; | ||
} | ||
#else | ||
namespace sakura | ||
{ | ||
using string = std::string; | ||
using wstring = std::wstring; | ||
} | ||
#endif | ||
namespace sakura | ||
{ | ||
using std::string_view; | ||
using std::to_string; | ||
using std::to_wstring; | ||
|
||
using u8string = std::string; | ||
using u8string_view = std::string_view; | ||
|
||
template<typename string_type> | ||
void string_replace( | ||
string_type& src, | ||
const string_type& to_replace, const string_type& replacement) | ||
{ | ||
typename string_type::size_type pos = 0; | ||
typename string_type::size_type srclen = to_replace.size(); | ||
typename string_type::size_type dstlen = replacement.size(); | ||
|
||
while ((pos = src.find(to_replace, pos)) != string_type::npos) | ||
{ | ||
src.replace(pos, srclen, replacement); | ||
pos += dstlen; | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
SakuraEngine/Source/Runtime/RuntimeCore/Include/System/Window.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#pragma once | ||
#include <Base/Definations.h> | ||
#include <SakuraSTL/string.hpp> | ||
|
||
namespace sakura | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.