Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: common/src/Registry.cpp

Issue 6216090891845632: Issue #404 - Create common library shared between plugin/engine and installer (Closed)
Patch Set: Created Jan. 9, 2015, 8:07 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld