本文整理汇总了C++中VectorMap::Clear方法的典型用法代码示例。如果您正苦于以下问题:C++ VectorMap::Clear方法的具体用法?C++ VectorMap::Clear怎么用?C++ VectorMap::Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VectorMap
的用法示例。
在下文中一共展示了VectorMap::Clear方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PPSync
void PPSync(const String& include_path)
{
LLOG("* PPSync");
sIncludePath.Clear();
sFlatPP.Clear();
sInclude_Path = include_path;
}
示例2: CleanPP
void CleanPP()
{
sAllMacros.Clear();
sPPfile.Clear();
sPPserial = 0;
LoadPPConfig();
}
示例3: Refresh
void ExtToMime::Refresh()
{
major.Clear();
minor.Clear();
map.Clear();
Load("/usr/local/share/mime/globs");
Load("/usr/share/mime/globs");
}
示例4: LoadTheme
void Themed::LoadTheme(const char *dir)
{
theme.Clear();
FindFile ff(AppendFileName(dir, "*.class"));
while(ff) {
String cls = ToLower(GetFileTitle(ff.GetName()));
theme.GetAdd(cls).Load(dir, cls);
ff.Next();
}
}
示例5: Flush
void sOptimizedTextRenderer::Flush()
{
if(cache.GetCount() == 0)
return;
LTIMING("Flush");
for(int i = 0; i < cache.GetCount(); i++) {
Chrs& c = cache[i];
if(c.x.GetCount()) {
Tuple2<Font, Color> fc = cache.GetKey(i);
int x = c.x[0];
for(int i = 0; i < c.x.GetCount() - 1; i++)
c.x[i] = c.x[i + 1] - c.x[i];
c.x.Top() = 0;
w.DrawText(x, y, c.text, fc.a, fc.b, c.x);
}
}
cache.Clear();
}
示例6: LoadPPConfig
void LoadPPConfig()
{
for(int i = 0; i < sAllMacros.GetCount(); i++)
if(sAllMacros[i].segment_id == 0 && !sAllMacros.IsUnlinked(i))
sAllMacros.Unlink(i);
s_namespace_macro.Clear();
s_namespace_end_macro.Clear();
StringStream ss(sDefs);
int linei = 0;
while(!ss.IsEof()) {
String l = ss.GetLine();
try {
CParser p(l);
if(p.Char('#')) {
if(p.Id("define")) {
CppMacro def;
String id = def.Define(p.GetPtr());
if(id.GetCount()) {
PPMacro m;
m.segment_id = 0;
m.line = linei;
m.macro = def;
sAllMacros.Put(id, m);
if(findarg(TrimBoth(def.body), "}", "};") >= 0)
s_namespace_end_macro.Add(id);
try {
CParser p(def.body);
if(p.Id("namespace") && p.IsId()) {
String n = p.ReadId();
if(p.Char('{') && p.IsEof())
s_namespace_macro.Add(id, n);
}
}
catch(CParser::Error) {}
}
}
}
}
catch(CParser::Error) {}
linei++;
}
}
示例7: SetOld
bool Speller::SetOld(const String& _data)
{
data = _data;
const char *s = data;
if(s >= data.End()) {
data.Clear();
return false;
}
charset = *s++;
s++;// reserved for prefixes
dict = *s++;
for(int i = 0; i < 256 - dict; i++) {
if(s >= data.End()) {
data.Clear();
return false;
}
voc[i] = s;
while(*s) s++;
s++;
}
line.Clear();
while(s < data.End()) {
if(s + 8 >= data.End()) {
data.Clear();
return false;
}
int code = Peek32le(s);
s += 4;
int len = Peek32le(s);
s += 4;
Line& l = line.Add(code);
l.begin = (const byte *)s;
s += len;
l.end = (const byte *)s;
};
return true;
}
示例8: InvalidateFileTimeCache
void InvalidateFileTimeCache()
{
sPathFileTime.Clear();
}