[X2Go-Commits] [x2goclient] 01/01: src/x2goclient.cpp: do not use std::array since that's a C++11 feature, just live with plain C arrays for now.

git-admin at x2go.org git-admin at x2go.org
Tue May 21 15:18:14 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit edfa928e8f9eb6dabf869649bf15e68b9d96b68b
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Tue May 21 15:16:36 2019 +0200

    src/x2goclient.cpp: do not use std::array since that's a C++11 feature, just live with plain C arrays for now.
---
 debian/changelog   | 2 ++
 src/x2goclient.cpp | 7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 456da4c..bb04e66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -58,6 +58,8 @@ x2goclient (4.1.2.2-0x2go1) UNRELEASED; urgency=medium
       We have never actually disabled it and x2goDebug () will not write out
       anything if debugging has not been requested, so we already have a soft
       condition check for every x2goDebug () call.
+    - src/x2goclient.cpp: do not use std::array since that's a C++11 feature,
+      just live with plain C arrays for now.
   * debian/control:
     + Add build-depend on pkg-config.
   * x2goclient.spec:
diff --git a/src/x2goclient.cpp b/src/x2goclient.cpp
index b3306b0..45fa075 100644
--- a/src/x2goclient.cpp
+++ b/src/x2goclient.cpp
@@ -27,7 +27,6 @@
 #include <cctype>
 #include <vector>
 #include <csignal>
-#include <array>
 
 #include "unixhelper.h"
 #include "ongetpass.h"
@@ -107,7 +106,7 @@ int main (int argc, char **argv) {
    *        make the function side-effect free. It should probably be
    *        refactored into a special options parser class.
    */
-  const std::array<const std::string, 6> bypass_flags = {
+  const std::string bypass_flags[] = {
     "--help",
     "--help-pack",
     "--version",
@@ -137,8 +136,8 @@ int main (int argc, char **argv) {
 
       /* Scan for flags bypassing the unix helper. */
       if (!(bypass_unix_helper)) {
-        for (std::array<const std::string, 6>::const_iterator cit = bypass_flags.cbegin (); cit != bypass_flags.cend (); ++cit) {
-          if (0 == cur_arg.compare (*cit)) {
+        for (std::size_t y = 0; y < sizeof (bypass_flags); ++y) {
+          if (0 == cur_arg.compare (bypass_flags[y])) {
             bypass_unix_helper = 1;
           }
         }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list