Ver código fonte

clang-format

Tatsuhiro Tsujikawa 9 anos atrás
pai
commit
8fc28a9e43
3 arquivos alterados com 11 adições e 7 exclusões
  1. 1 1
      src/OptionHandlerImpl.cc
  2. 9 5
      src/RpcMethodFactory.cc
  3. 1 1
      src/RpcMethodImpl.cc

+ 1 - 1
src/OptionHandlerImpl.cc

@@ -623,7 +623,7 @@ void OptimizeConcurrentDownloadsOptionHandler::parseArg(
     PrefPtr pref = PREF_OPTIMIZE_CONCURRENT_DOWNLOADS_COEFFA;
     std::string* sptr = &coeff_a;
     for (;;) {
-      char *end;
+      char* end;
       errno = 0;
       auto dbl = strtod(sptr->c_str(), &end);
       if (errno != 0 || sptr->c_str() + sptr->size() != end) {

+ 9 - 5
src/RpcMethodFactory.cc

@@ -76,15 +76,19 @@ const std::vector<std::string>& allMethodNames() { return rpcMethodNames; }
 
 namespace {
 std::vector<std::string> rpcNotificationsNames = {
-    "aria2.onDownloadStart", "aria2.onDownloadPause", "aria2.onDownloadStop",
-    "aria2.onDownloadComplete", "aria2.onDownloadError",
-    #ifdef ENABLE_BITTORRENT
+    "aria2.onDownloadStart",      "aria2.onDownloadPause",
+    "aria2.onDownloadStop",       "aria2.onDownloadComplete",
+    "aria2.onDownloadError",
+#ifdef ENABLE_BITTORRENT
     "aria2.onBtDownloadComplete",
-    #endif // ENABLE_BITTORRENT
+#endif // ENABLE_BITTORRENT
 };
 } // namespace
 
-const std::vector<std::string>& allNotificationsNames() { return rpcNotificationsNames; }
+const std::vector<std::string>& allNotificationsNames()
+{
+  return rpcNotificationsNames;
+}
 
 namespace {
 std::unique_ptr<RpcMethod> createMethod(const std::string& methodName)

+ 1 - 1
src/RpcMethodImpl.cc

@@ -1453,7 +1453,7 @@ RpcResponse SystemListMethodsRpcMethod::execute(RpcRequest req,
 
 std::unique_ptr<ValueBase>
 SystemListNotificationsRpcMethod::process(const RpcRequest& req,
-                                                DownloadEngine* e)
+                                          DownloadEngine* e)
 {
   auto list = List::g();
   for (auto& s : allNotificationsNames()) {