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

Unified Diff: installer/src/installer-lib/property.h

Issue 29329159: Issue #1185 - Fix formatting in installer-lib and its tests (Closed)
Patch Set: Created Oct. 15, 2015, 7:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « installer/src/installer-lib/process.cpp ('k') | installer/src/installer-lib/property.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/src/installer-lib/property.h
===================================================================
--- a/installer/src/installer-lib/property.h
+++ b/installer/src/installer-lib/property.h
@@ -2,9 +2,9 @@
* \file property.h Installer property, whether from a live installation session or directly from a package or installed product.
*/
-#ifndef PROPERTY_H
-#define PROPERTY_H
-
+#ifndef PROPERTY_H
+#define PROPERTY_H
+
#include <string>
#include "windows.h"
#include "msi.h"
@@ -12,7 +12,7 @@
/*
* Forward declaration of Session class required to break what's otherwise a cyclic definition.
*/
-class Session ;
+class Session;
/**
* Class representing an MSI property.
@@ -35,7 +35,7 @@
* The semantics of properties is that they always appear as defined.
* Properties not explicitly defined are considered to have the empty string (zero-length) as their value.
* The return values of the API functions, for example, do not have an error code of "property not found".
-*
+*
* Rather than getter/setter functions, this class allows Property instances to appear exactly as strings.
* Instead of a getter, we provide a string conversion operator.
* Instead of a setter, we provide an overloaded assignment operator.
@@ -47,7 +47,7 @@
* \remark
* The class makes a copy of the handle of the underlying object rather than keeping a reference to that object.
* This approach has the drawback that the user must ensure that the underlying object remains open for the lifetime of one of its derived Property instances.
-* For single-threaded custom actions (the ordinary case), this is never a problem,
+* For single-threaded custom actions (the ordinary case), this is never a problem,
* because the entry point constructs a Session that lasts the entire duration of the CA.
* For other tools using the library, this may not be the case.
* Nevertheless, for a typical case where the scope of a Property is a single function, there's no problem.
@@ -60,7 +60,7 @@
/**
* Conversion operator to std::wstring provides rvalue access to the property.
*/
- operator std::wstring() const ;
+ operator std::wstring() const;
/**
* Assignment operator from std::wstring provides lvalue access to the property.
@@ -68,7 +68,7 @@
* \par[in] value
* Value to be assigned to the property
*/
- void operator=( const std::wstring & value ) ;
+ void operator=(const std::wstring& value);
/**
* Constructor from a session.
@@ -82,14 +82,14 @@
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa370543%28v=vs.85%29.aspx
* for a list of properties that are available to deferred custom actions.
*/
- Property( Session & session, std::wstring name ) ;
+ Property(Session& session, std::wstring name);
private:
/**
* Handle to the installation, product, or package.
* Any of these is permissible; the API does not distinguish these as types.
*/
- MSIHANDLE handle ;
+ MSIHANDLE handle;
/**
* Name of the property.
@@ -97,8 +97,8 @@
* \sa http://msdn.microsoft.com/en-us/library/windows/desktop/aa371245%28v=vs.85%29.aspx for more on property names,
* including valid syntax and the internal scoping that the installer uses.
*/
- std::wstring name ;
-} ;
+ std::wstring name;
+};
/*
* We need a couple of ancillary addition operators to concatenate properties and constants strings.
@@ -110,17 +110,17 @@
/**
* Concatenation operator for a constant-string plus a property
*/
-inline std::wstring operator+( const wchar_t * left, const Property & right )
+inline std::wstring operator+(const wchar_t* left, const Property& right)
{
- return left + std::wstring( right ) ;
+ return left + std::wstring(right);
}
/**
* Concatenation operator for a property and a constant-string
*/
-inline std::wstring operator+( const Property & left, const wchar_t * right )
+inline std::wstring operator+(const Property& left, const wchar_t* right)
{
- return std::wstring( left ) + right ;
+ return std::wstring(left) + right;
}
#endif
« no previous file with comments | « installer/src/installer-lib/process.cpp ('k') | installer/src/installer-lib/property.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld