Addressed issues found by Google code lint.
Fixed: - Removed trailing whitespace. - Removed out of date TODO's. - Added #include<algorithm> to DataManager.cpp - Reordered includes to include C system headers before C++ system headers. - Added username to TODO's - Renamed include guards to use full project name as prefix. - Made methods and parameters const where possible. - Made UDPSocket constructor explicit. Won't Fix: - snprintf is introduced in C++11. - Trailing comments at the end of namespace & header guards - Did not re-inlude headers already included by the matching XPC header. - localtime is fine since X-Plane is not multithreaded at all on the plugin side. - Linter confuses #elif with parens as a function call. - namespace indentation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//Copyright (c) 2013-2015 United States Government as represented by the Administrator of the
|
||||
//National Aeronautics and Space Administration. All Rights Reserved.
|
||||
#ifndef XPC_MESSAGEHANDLERS_H
|
||||
#define XPC_MESSAGEHANDLERS_H
|
||||
#ifndef XPCPLUGIN_MESSAGEHANDLERS_H_
|
||||
#define XPCPLUGIN_MESSAGEHANDLERS_H_
|
||||
#include "Message.h"
|
||||
|
||||
#include <string>
|
||||
@@ -10,7 +10,7 @@
|
||||
namespace XPC
|
||||
{
|
||||
/// A function that handles a message.
|
||||
typedef void(*MessageHandler)(Message&);
|
||||
typedef void(*MessageHandler)(const Message&);
|
||||
|
||||
/// Handles incommming messages and manages connections.
|
||||
///
|
||||
@@ -37,18 +37,18 @@ namespace XPC
|
||||
static void SetSocket(UDPSocket* socket);
|
||||
|
||||
private:
|
||||
static void HandleConn(Message& msg);
|
||||
static void HandleCtrl(Message& msg);
|
||||
static void HandleData(Message& msg);
|
||||
static void HandleDref(Message& msg);
|
||||
static void HandleGetD(Message& msg);
|
||||
static void HandlePosi(Message& msg);
|
||||
static void HandleSimu(Message& msg);
|
||||
static void HandleText(Message& msg);
|
||||
static void HandleWypt(Message& msg);
|
||||
static void HandleView(Message& msg);
|
||||
static void HandleXPlaneData(Message& msg);
|
||||
static void HandleUnknown(Message& msg);
|
||||
static void HandleConn(const Message& msg);
|
||||
static void HandleCtrl(const Message& msg);
|
||||
static void HandleData(const Message& msg);
|
||||
static void HandleDref(const Message& msg);
|
||||
static void HandleGetD(const Message& msg);
|
||||
static void HandlePosi(const Message& msg);
|
||||
static void HandleSimu(const Message& msg);
|
||||
static void HandleText(const Message& msg);
|
||||
static void HandleWypt(const Message& msg);
|
||||
static void HandleView(const Message& msg);
|
||||
static void HandleXPlaneData(const Message& msg);
|
||||
static void HandleUnknown(const Message& msg);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user