-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move descriptor binding code to a single pipeline function.
- Loading branch information
Showing
16 changed files
with
461 additions
and
596 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
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,34 @@ | ||
#pragma once | ||
|
||
// Standard. | ||
#include <string_view> | ||
#include <cstddef> | ||
|
||
namespace ne { | ||
/** Used for `find` in `map` to work with `std::string_view` while the key is `std::string`. */ | ||
struct StdStringHash { | ||
/** Tag. */ | ||
using is_transparent = void; | ||
|
||
/** | ||
* Calculates hash. | ||
* @param pText Text to hash. | ||
* @return Hash. | ||
*/ | ||
std::size_t operator()(const char* pText) const { return std::hash<std::string_view>{}(pText); } | ||
|
||
/** | ||
* Calculates hash. | ||
* @param text Text to hash. | ||
* @return Hash. | ||
*/ | ||
std::size_t operator()(std::string_view text) const { return std::hash<std::string_view>{}(text); } | ||
|
||
/** | ||
* Calculates hash. | ||
* @param text Text to hash. | ||
* @return Hash. | ||
*/ | ||
std::size_t operator()(std::string const& text) const { return std::hash<std::string_view>{}(text); } | ||
}; | ||
} |
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
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.