Commit 770cd5e3 authored by Johannes Braun's avatar Johannes Braun

Fix issues with not jumping over comments.

parent 5a64ce45
......@@ -158,7 +158,18 @@ namespace glshader::process
{
shader_binary result;
files::path dst = absolute(shader);
const auto hash = std::hash<std::string>()(dst.string());
auto hash = std::hash<std::string>()(dst.string());
for (const auto& def : definitions)
{
hash ^= std::hash<std::string>()(def.info.replacement);
}
for (const auto& inc : includes)
{
hash ^= std::hash<std::string>()(inc.string());
}
if (!files::exists(_cache_dir))
{
files::create_directories(_cache_dir);
......
......@@ -53,7 +53,7 @@ namespace glshader::process::impl::skip
{
if (strncmp(text_ptr, "//", 2) == 0)
{
while (!classify::is_newline(text_ptr) && classify::is_eof(text_ptr))
while (!classify::is_newline(text_ptr) && !classify::is_eof(text_ptr))
++text_ptr;
}
else if (strncmp(text_ptr, "/*", 2) == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment