Ver código fonte

Format code after merge

bel2125 8 anos atrás
pai
commit
cd3a8cf8a5
2 arquivos alterados com 17 adições e 15 exclusões
  1. 10 9
      include/CivetServer.h
  2. 7 6
      src/CivetServer.cpp

+ 10 - 9
include/CivetServer.h

@@ -228,10 +228,10 @@ class CIVETWEB_API CivetServer
 	 */
 	CivetServer(const char **options,
 	            const struct CivetCallbacks *callbacks = 0,
-                    const void *UserContext = 0);
+	            const void *UserContext = 0);
 	CivetServer(std::vector<std::string> options,
 	            const struct CivetCallbacks *callbacks = 0,
-                    const void *UserContext = 0);
+	            const void *UserContext = 0);
 
 	/**
 	 * Destructor
@@ -533,13 +533,14 @@ class CIVETWEB_API CivetServer
 	                      std::string &dst,
 	                      bool append = false);
 
-        // generic user context which can be set/read,
-        // the server does nothing with this apart from keep it.
-	const void *getUserContext() const
+	// generic user context which can be set/read,
+	// the server does nothing with this apart from keep it.
+	const void *
+	getUserContext() const
 	{
 		return UserContext;
 	}
-        
+
   protected:
 	class CivetConnection
 	{
@@ -554,9 +555,9 @@ class CIVETWEB_API CivetServer
 	struct mg_context *context;
 	std::map<struct mg_connection *, class CivetConnection> connections;
 
-        // generic user context which can be set/read,
-        // the server does nothing with this apart from keep it.
-        const void *UserContext;
+	// generic user context which can be set/read,
+	// the server does nothing with this apart from keep it.
+	const void *UserContext;
 
   private:
 	/**

+ 7 - 6
src/CivetServer.cpp

@@ -275,8 +275,8 @@ CivetServer::CivetServer(const char **options,
 {
 	struct CivetCallbacks callbacks;
 
-        UserContext = UserContextIn;
-        
+	UserContext = UserContextIn;
+
 	if (_callbacks) {
 		callbacks = *_callbacks;
 		userCloseHandler = _callbacks->connection_close;
@@ -296,8 +296,8 @@ CivetServer::CivetServer(std::vector<std::string> options,
     : context(0)
 {
 	struct CivetCallbacks callbacks;
-        
-        UserContext = UserContextIn;
+
+	UserContext = UserContextIn;
 
 	if (_callbacks) {
 		callbacks = *_callbacks;
@@ -581,8 +581,9 @@ CivetServer::getListeningPorts()
 {
 	std::vector<int> ports(50);
 	std::vector<struct mg_server_ports> server_ports(50);
-	int size =
-	    mg_get_server_ports(context, (int)server_ports.size(), &server_ports[0]);
+	int size = mg_get_server_ports(context,
+	                               (int)server_ports.size(),
+	                               &server_ports[0]);
 	if (size <= 0) {
 		ports.resize(0);
 		return ports;