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

Unified Diff: installer/src/installer-lib/installer-lib.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/handle.h ('k') | installer/src/installer-lib/interaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/src/installer-lib/installer-lib.h
===================================================================
--- a/installer/src/installer-lib/installer-lib.h
+++ b/installer/src/installer-lib/installer-lib.h
@@ -34,38 +34,38 @@
class WindowsApiError
: public std::runtime_error
{
- template< class T1, class T2, class T3 >
- static std::string MakeMessage( T1 apiFunction, T2 errorCode, T3 message )
+ template<class T1, class T2, class T3>
+ static std::string MakeMessage(T1 apiFunction, T2 errorCode, T3 message)
{
- std::ostringstream r, t ;
- std::string s ;
+ std::ostringstream r, t;
+ std::string s;
- t << apiFunction ;
- s = t.str() ;
- if ( s.empty() )
+ t << apiFunction;
+ s = t.str();
+ if (s.empty())
{
- s = "<unspecified>" ;
+ s = "<unspecified>";
}
- r << s << " returned " ;
+ r << s << " returned ";
- t = std::ostringstream() ;
- t << errorCode ;
- s = t.str() ;
- if ( s.empty() )
+ t = std::ostringstream();
+ t << errorCode;
+ s = t.str();
+ if (s.empty())
{
- s = "<unknown>" ;
+ s = "<unknown>";
}
- r << s << " with last error code " << ::GetLastError() ;
+ r << s << " with last error code " << ::GetLastError();
- t = std::ostringstream() ;
- t << message ;
- s = t.str() ;
- if ( ! s.empty() )
+ t = std::ostringstream();
+ t << message;
+ s = t.str();
+ if (! s.empty())
{
- r << ": " << s ;
+ r << ": " << s;
}
- return r.str() ;
+ return r.str();
}
public:
@@ -73,32 +73,32 @@
* Constructor with additional message.
*
* \param apiFunction
- * The name of the API function that returned an error code or a null handle.
+ * The name of the API function that returned an error code or a null handle.
* \param errorCode
* The error code that the function returned, either symbolic or numeric.
* Will be zero when the function returned a null handle.
* \param message
* Extra message to clarify the error
*/
- template< class T1, class T2, class T3 >
- WindowsApiError( T1 apiFunction, T2 errorCode, T3 message )
- : std::runtime_error( MakeMessage( apiFunction, errorCode, message ) )
+ template<class T1, class T2, class T3>
+ WindowsApiError(T1 apiFunction, T2 errorCode, T3 message)
+ : std::runtime_error(MakeMessage(apiFunction, errorCode, message))
{}
/**
* Constructor without anything extra.
*
* \param apiFunction
- * The name of the API function that returned an error code or a null handle.
+ * The name of the API function that returned an error code or a null handle.
* \param errorCode
* The error code that the function returned, either symbolic or numeric.
* Will be zero when the function returned a null handle.
*/
- template< class T1, class T2 >
- WindowsApiError( T1 apiFunction, T2 errorCode)
- : std::runtime_error( MakeMessage( apiFunction, errorCode, "" ) )
+ template<class T1, class T2>
+ WindowsApiError(T1 apiFunction, T2 errorCode)
+ : std::runtime_error(MakeMessage(apiFunction, errorCode, ""))
{}
-} ;
+};
/**
*/
@@ -106,9 +106,9 @@
: public std::runtime_error
{
public:
- NotYetSupported( std::string message )
- : std::runtime_error( "Not yet supported: " + message )
+ NotYetSupported(std::string message)
+ : std::runtime_error("Not yet supported: " + message)
{}
-} ;
+};
#endif
« no previous file with comments | « installer/src/installer-lib/handle.h ('k') | installer/src/installer-lib/interaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld