Merge pull request #3431 from stenzek/shadercache

ShaderGen: Remove virtual methods and string from ShaderGeneratorInterface.
This commit is contained in:
Mathew Maidment
2016-01-04 19:11:14 -05:00
6 changed files with 35 additions and 32 deletions

View File

@ -7,6 +7,7 @@
#include <cstring>
#include <fstream>
#include <string>
#include <type_traits>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
@ -54,6 +55,15 @@ public:
{
using std::ios_base;
// Since we're reading/writing directly to the storage of K instances,
// K must be trivially copyable. TODO: Remove #if once GCC 5.0 is a
// minimum requirement.
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
static_assert(std::has_trivial_copy_constructor<K>::value, "K must be a trivially copyable type");
#else
static_assert(std::is_trivially_copyable<K>::value, "K must be a trivially copyable type");
#endif
// close any currently opened file
Close();
m_num_entries = 0;