Reformat all code parts

This commit is contained in:
Simon Fels 2017-01-03 09:18:10 +01:00
commit 6307ee4b65
15 changed files with 392 additions and 382 deletions

View file

@ -19,8 +19,8 @@
#define ANBOX_APPLICATION_MANAGER_H_ #define ANBOX_APPLICATION_MANAGER_H_
#include "anbox/android/intent.h" #include "anbox/android/intent.h"
#include "anbox/graphics/rect.h"
#include "anbox/do_not_copy_or_move.h" #include "anbox/do_not_copy_or_move.h"
#include "anbox/graphics/rect.h"
#include <string> #include <string>

View file

@ -105,14 +105,16 @@ void cli::CommandWithSubcommands::help(std::ostream& out) {
<< std::endl; << std::endl;
if (flags_.size() > 0) { if (flags_.size() > 0) {
out << std::endl << pattern::options << std::endl; out << std::endl
<< pattern::options << std::endl;
for (const auto& flag : flags_) for (const auto& flag : flags_)
out << boost::format(pattern::option) % flag->name() % flag->description() out << boost::format(pattern::option) % flag->name() % flag->description()
<< std::endl; << std::endl;
} }
if (commands_.size() > 0) { if (commands_.size() > 0) {
out << std::endl << pattern::commands << std::endl; out << std::endl
<< pattern::commands << std::endl;
for (const auto& cmd : commands_) { for (const auto& cmd : commands_) {
if (cmd.second) if (cmd.second)
out << boost::format(pattern::command) % cmd.second->name() % out << boost::format(pattern::command) % cmd.second->name() %
@ -222,7 +224,8 @@ void cli::CommandWithFlagsAndAction::help(std::ostream& out) {
<< std::endl; << std::endl;
if (flags_.size() > 0) { if (flags_.size() > 0) {
out << std::endl << boost::format(pattern::options) << std::endl; out << std::endl
<< boost::format(pattern::options) << std::endl;
for (const auto& flag : flags_) for (const auto& flag : flags_)
out << boost::format(pattern::option) % flag->name() % flag->description() out << boost::format(pattern::option) % flag->name() % flag->description()
<< std::endl; << std::endl;

View file

@ -16,8 +16,7 @@
namespace anbox { namespace anbox {
namespace common { namespace common {
MessageChannelBase::MessageChannelBase(size_t capacity) : MessageChannelBase::MessageChannelBase(size_t capacity) : pos_(0U),
pos_(0U),
count_(0U), count_(0U),
capacity_(capacity), capacity_(capacity),
lock_(), lock_(),

View file

@ -17,8 +17,8 @@
#include <stddef.h> #include <stddef.h>
#include <mutex>
#include <condition_variable> #include <condition_variable>
#include <mutex>
namespace anbox { namespace anbox {
namespace common { namespace common {

View file

@ -39,7 +39,8 @@ struct FuncDelete {
FuncDelete& operator=(FuncDelete&& other) = default; FuncDelete& operator=(FuncDelete&& other) = default;
// To be able to copy/move from all compatible template instantiations. // To be able to copy/move from all compatible template instantiations.
template <class U> friend struct FuncDelete; template <class U>
friend struct FuncDelete;
// Template constructors and move assignment from compatible instantiations. // Template constructors and move assignment from compatible instantiations.
template <class U> template <class U>

View file

@ -18,11 +18,11 @@
#include "anbox/container/client.h" #include "anbox/container/client.h"
#include "anbox/config.h" #include "anbox/config.h"
#include "anbox/container/management_api_stub.h" #include "anbox/container/management_api_stub.h"
#include "anbox/logger.h"
#include "anbox/network/local_socket_messenger.h" #include "anbox/network/local_socket_messenger.h"
#include "anbox/rpc/channel.h" #include "anbox/rpc/channel.h"
#include "anbox/rpc/message_processor.h" #include "anbox/rpc/message_processor.h"
#include "anbox/rpc/pending_call_cache.h" #include "anbox/rpc/pending_call_cache.h"
#include "anbox/logger.h"
namespace ba = boost::asio; namespace ba = boost::asio;
namespace bs = boost::system; namespace bs = boost::system;

View file

@ -56,7 +56,9 @@ class WindowSurface {
bool flushColorBuffer(); bool flushColorBuffer();
// Used by bind() below. // Used by bind() below.
enum BindType { BIND_READ, BIND_DRAW, BIND_READDRAW }; enum BindType { BIND_READ,
BIND_DRAW,
BIND_READDRAW };
// TODO(digit): What is this used for exactly? For example, the // TODO(digit): What is this used for exactly? For example, the
// mReadContext is never used by this class. The mDrawContext is only // mReadContext is never used by this class. The mDrawContext is only

View file

@ -33,7 +33,12 @@ class Logger : public DoNotCopyOrMove {
public: public:
// Severity enumerates all known severity levels // Severity enumerates all known severity levels
// applicable to log messages. // applicable to log messages.
enum class Severity { kTrace, kDebug, kInfo, kWarning, kError, kFatal }; enum class Severity { kTrace,
kDebug,
kInfo,
kWarning,
kError,
kFatal };
// A Location describes the origin of a log message. // A Location describes the origin of a log message.
struct Location { struct Location {