OLD | NEW |
1 #include "Registry.h" | 1 #include "Registry.h" |
2 #include <memory> | 2 #include <memory> |
3 | 3 |
4 using namespace AdblockPlus; | 4 using namespace AdblockPlus; |
5 | 5 |
6 RegistryKey::RegistryKey(HKEY parent, const std::wstring& key_name) | 6 RegistryKey::RegistryKey(HKEY parent, const std::wstring& key_name) |
7 { | 7 { |
8 if (key_name.empty()) | 8 if (key_name.empty()) |
9 { | 9 { |
10 throw std::runtime_error("key_name may not be empty"); | 10 throw std::runtime_error("key_name may not be empty"); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 * If so, we have to decrement the length of the return value to eliminate it. | 61 * If so, we have to decrement the length of the return value to eliminate it. |
62 * If it persists, it will interfere with later string operations such as conc
atenation. | 62 * If it persists, it will interfere with later string operations such as conc
atenation. |
63 */ | 63 */ |
64 if (p[psize - 1] == L'\0') | 64 if (p[psize - 1] == L'\0') |
65 { | 65 { |
66 --psize; | 66 --psize; |
67 } | 67 } |
68 return std::wstring(p.get(), psize); | 68 return std::wstring(p.get(), psize); |
69 } | 69 } |
70 | 70 |
OLD | NEW |