diff --git a/uppsrc/CppBase/cpp.cpp b/uppsrc/CppBase/cpp.cpp index 50b50853c..66fd0896e 100644 --- a/uppsrc/CppBase/cpp.cpp +++ b/uppsrc/CppBase/cpp.cpp @@ -208,9 +208,6 @@ void Cpp::DoFlatInclude(const String& header_path) namespace_using.FindAdd(m.text); usings << ";" << m.text; } - else - if(m.type == PP_INCLUDE) // In flat PP, only marker - usings << ";[" << m.text << "]"; } } } diff --git a/uppsrc/CppBase/ppfile.cpp b/uppsrc/CppBase/ppfile.cpp index 444caa7a5..560e14f71 100644 --- a/uppsrc/CppBase/ppfile.cpp +++ b/uppsrc/CppBase/ppfile.cpp @@ -252,17 +252,19 @@ void PPFile::Parse(Stream& in) String id; while(p.Char2(':', ':')) id = "::"; - id << p.ReadId(); - while(p.Char2(':', ':')) - id << "::" << p.ReadId(); - if(!was_using) - namespace_block.Add(level); - if(!was_using || level == 0) { - PPItem& m = item.Add(); - next_segment = true; - m.type = type; - m.text = id; - DLOG("namespace " << id); + if(p.IsId()) { + id << p.ReadId(); + while(p.Char2(':', ':') && p.IsId()) + id << "::" << p.ReadId(); + if(!was_using) + namespace_block.Add(level); + if(!was_using || level == 0) { + PPItem& m = item.Add(); + next_segment = true; + m.type = type; + m.text = id; + DLOG("namespace " << id); + } } was_namespace = was_using = false; } @@ -503,7 +505,6 @@ const PPFile& GetFlatPPFile(const char *path, Index& visited) const PPFile& pp = GetPPFile(path); for(int i = 0; i < pp.item.GetCount(); i++) { const PPItem& m = pp.item[i]; - fp.item.Add(m); if(m.type == PP_INCLUDE) { String s = GetIncludePath(m.text, GetFileFolder(path)); if(s.GetCount() && visited.Find(s) < 0) { @@ -513,6 +514,8 @@ const PPFile& GetFlatPPFile(const char *path, Index& visited) fp.item.Add(pp.item[i]); } } + else + fp.item.Add(m); } return fp; } diff --git a/uppsrc/plugin/gif/init b/uppsrc/plugin/gif/init index 00c49fb10..cc099fdd9 100644 --- a/uppsrc/plugin/gif/init +++ b/uppsrc/plugin/gif/init @@ -1,7 +1,7 @@ #ifndef _plugin_gif_icpp_init_stub #define _plugin_gif_icpp_init_stub #include "Draw/init" -#define BLITZ_INDEX__ F83dcee67a1bc1f0bd2e36ea2875568c2 +#define BLITZ_INDEX__ F822a3f6a2543aefad7ddf3febf8ae3a5 #include "gif.icpp" #undef BLITZ_INDEX__ #endif