Skip to content

Commit 333b7cb

Browse files
committed
No need for natvis namespace now that db was renamed to db_cache
1 parent a20fba7 commit 333b7cb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

natvis/cppwinrt_visualizer.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using namespace std::filesystem;
1111
using namespace winrt;
1212
using namespace winmd::reader;
1313

14-
namespace natvis
14+
namespace
1515
{
1616
std::vector<std::string> db_files;
1717
std::unique_ptr<cache> db_cache;
@@ -106,10 +106,10 @@ void LoadMetadata(DkmProcess* process, WCHAR const* processPath, std::string_vie
106106

107107
auto const path_string = winmd_path.string();
108108

109-
if (std::find(natvis::db_files.begin(), natvis::db_files.end(), path_string) == natvis::db_files.end())
109+
if (std::find(db_files.begin(), db_files.end(), path_string) == db_files.end())
110110
{
111-
natvis::db_cache->add_database(path_string, [](TypeDef const& type) { return type.Flags().WindowsRuntime(); });
112-
natvis::db_files.push_back(path_string);
111+
db_cache->add_database(path_string, [](TypeDef const& type) { return type.Flags().WindowsRuntime(); });
112+
db_files.push_back(path_string);
113113
}
114114
}
115115
auto pos = probe_file.rfind('.');
@@ -124,12 +124,12 @@ void LoadMetadata(DkmProcess* process, WCHAR const* processPath, std::string_vie
124124
TypeDef FindSimpleType(DkmProcess* process, std::string_view const& typeName)
125125
{
126126
XLANG_ASSERT(typeName.find('<') == std::string_view::npos);
127-
auto type = natvis::db_cache->find(typeName);
127+
auto type = db_cache->find(typeName);
128128
if (!type)
129129
{
130130
auto processPath = process->Path()->Value();
131131
LoadMetadata(process, processPath, typeName);
132-
type = natvis::db_cache->find(typeName);
132+
type = db_cache->find(typeName);
133133
if (!type)
134134
{
135135
NatvisDiagnostic(process,
@@ -142,7 +142,7 @@ TypeDef FindSimpleType(DkmProcess* process, std::string_view const& typeName)
142142
TypeDef FindSimpleType(DkmProcess* process, std::string_view const& typeNamespace, std::string_view const& typeName)
143143
{
144144
XLANG_ASSERT(typeName.find('<') == std::string_view::npos);
145-
auto type = natvis::db_cache->find(typeNamespace, typeName);
145+
auto type = db_cache->find(typeNamespace, typeName);
146146
if (!type)
147147
{
148148
std::string fullName(typeNamespace);
@@ -245,10 +245,10 @@ cppwinrt_visualizer::cppwinrt_visualizer()
245245
{
246246
if (std::filesystem::is_regular_file(file))
247247
{
248-
natvis::db_files.push_back(file.path().string());
248+
db_files.push_back(file.path().string());
249249
}
250250
}
251-
natvis::db_cache.reset(new cache(natvis::db_files, [](TypeDef const& type) { return type.Flags().WindowsRuntime(); }));
251+
db_cache.reset(new cache(db_files, [](TypeDef const& type) { return type.Flags().WindowsRuntime(); }));
252252
}
253253
catch (...)
254254
{
@@ -270,8 +270,8 @@ cppwinrt_visualizer::cppwinrt_visualizer()
270270
cppwinrt_visualizer::~cppwinrt_visualizer()
271271
{
272272
ClearTypeResolver();
273-
natvis::db_files.clear();
274-
natvis::db_cache.reset();
273+
db_files.clear();
274+
db_cache.reset();
275275
}
276276

277277
HRESULT cppwinrt_visualizer::EvaluateVisualizedExpression(

0 commit comments

Comments
 (0)