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

Unified Diff: installer/src/installer-lib/session.cpp

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/session.h ('k') | installer/src/installer-lib/test/custom-action-fail.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/src/installer-lib/session.cpp
===================================================================
--- a/installer/src/installer-lib/session.cpp
+++ b/installer/src/installer-lib/session.cpp
@@ -10,33 +10,33 @@
//-----------------------------------------------------------------------------------------
// Message
//-----------------------------------------------------------------------------------------
-Message::Message( std::string message, INSTALLMESSAGE messageType )
- : r( 1 ), MessageTypeCode( messageType )
+Message::Message(std::string message, INSTALLMESSAGE messageType)
+ : r(1), MessageTypeCode(messageType)
{
- r.AssignString( 0, message ) ;
+ r.AssignString(0, message);
}
-Message::Message( std::wstring message, INSTALLMESSAGE messageType )
- : r( 1 ), MessageTypeCode( messageType )
+Message::Message(std::wstring message, INSTALLMESSAGE messageType)
+ : r(1), MessageTypeCode(messageType)
{
- r.AssignString( 0, message ) ;
+ r.AssignString(0, message);
}
//-----------------------------------------------------------------------------------------
// Session
//-----------------------------------------------------------------------------------------
-Session::Session( MSIHANDLE handle, std::string name )
- : handle( handle ),
- logPrefix( name + ": " )
+Session::Session(MSIHANDLE handle, std::string name)
+ : handle(handle),
+ logPrefix(name + ": ")
{
- logPrefixW.assign( name.begin(), name.end() ) ;
- logPrefixW += L": " ;
- LogNoexcept( "Entering custom action" ) ;
+ logPrefixW.assign(name.begin(), name.end());
+ logPrefixW += L": ";
+ LogNoexcept("Entering custom action");
}
Session::~Session()
{
- LogNoexcept( "Exiting custom action" ) ;
+ LogNoexcept("Exiting custom action");
}
/**
@@ -49,48 +49,48 @@
struct LogMessage
: public Message
{
- LogMessage ( std::wstring message )
- : Message( message, INSTALLMESSAGE_INFO )
+ LogMessage(std::wstring message)
+ : Message(message, INSTALLMESSAGE_INFO)
{}
- LogMessage ( std::string message )
- : Message( message, INSTALLMESSAGE_INFO )
+ LogMessage(std::string message)
+ : Message(message, INSTALLMESSAGE_INFO)
{}
-} ;
+};
-void Session::Log( std::string message )
+void Session::Log(std::string message)
{
- WriteMessage( LogMessage( logPrefix + message ) ) ;
+ WriteMessage(LogMessage(logPrefix + message));
}
-void Session::Log( std::wstring message )
+void Session::Log(std::wstring message)
{
- WriteMessage( LogMessage( logPrefixW + message ) ) ;
+ WriteMessage(LogMessage(logPrefixW + message));
}
-void Session::LogNoexcept( std::string message )
+void Session::LogNoexcept(std::string message)
{
- WriteMessageNoexcept( LogMessage( logPrefix + message ) ) ;
+ WriteMessageNoexcept(LogMessage(logPrefix + message));
}
-int Session::WriteMessage( Message & m )
+int Session::WriteMessage(Message& m)
{
- int x = WriteMessageNoexcept( m ) ;
- if ( x == -1 )
+ int x = WriteMessageNoexcept(m);
+ if (x == -1)
{
- throw WindowsApiError( "MsiProcessMessage", x, "attempt to write to log file" ) ;
+ throw WindowsApiError("MsiProcessMessage", x, "attempt to write to log file");
}
- return x ;
+ return x;
}
-int Session::WriteMessageNoexcept( Message & m )
+int Session::WriteMessageNoexcept(Message& m)
{
- return MsiProcessMessage( handle, m.MessageTypeCode, m.r.Handle() ) ;
+ return MsiProcessMessage(handle, m.MessageTypeCode, m.r.Handle());
}
//-----------------------------------------------------------------------------------------
// ImmediateSession
//-----------------------------------------------------------------------------------------
-ImmediateSession::ImmediateSession( MSIHANDLE handle, std::string name )
- : Session( handle, name )
+ImmediateSession::ImmediateSession(MSIHANDLE handle, std::string name)
+ : Session(handle, name)
{}
« no previous file with comments | « installer/src/installer-lib/session.h ('k') | installer/src/installer-lib/test/custom-action-fail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld