PageRenderTime 33ms CodeModel.GetById 30ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/win32/shellext/ThgDebug.cpp

https://bitbucket.org/tortoisehg/hgtk/
C++ | 22 lines | 12 code | 4 blank | 6 comment | 3 complexity | a8cb78983371fa528b1652bfb75b12ed MD5 | raw file
 1
 2// Copyright (C) 2009 Adrian Buehlmann
 3//
 4// This program is free software: you can redistribute it and/or modify
 5// it under the terms of the GNU General Public License as published by
 6// the Free Software Foundation, either version 2 of the License, or
 7// (at your option) any later version.
 8
 9#include "ThgDebug.h"
10#include "RegistryConfig.h"
11
12bool ThgDebug::regDebugShellExt()
13{
14    std::string val;
15    return GetRegistryConfig("DebugShellExt", val) != 0 && val == "1";
16}
17
18bool ThgDebug::enabled()
19{
20    static bool e = regDebugShellExt();
21    return e;
22}