remove override from adjacent_tokens_only
[folly.git] / folly / experimental / ProgramOptions.cpp
index 8cf27137e7ba99f024254289f78c0989e335b961..73c471ffd2d3d5d493251733ff735a6b35c0ac3f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <unordered_set>
 
 #include <boost/version.hpp>
-#include <gflags/gflags.h>
 #include <glog/logging.h>
+
 #include <folly/Conv.h>
 #include <folly/Portability.h>
+#include <folly/portability/GFlags.h>
 
 namespace po = ::boost::program_options;
 
@@ -82,12 +83,14 @@ class GFlagValueSemanticBase : public po::value_semantic {
 
   std::string name() const override { return "arg"; }
 #if BOOST_VERSION >= 105900
-  bool adjacent_tokens_only() const override { return false; }
+  bool adjacent_tokens_only() const {
+    return false;
+  }
 #endif
   bool is_composing() const override { return false; }
   bool is_required() const override { return false; }
   // We handle setting the GFlags from parse(), so notify() does nothing.
-  void notify(const boost::any& valueStore) const override { }
+  void notify(const boost::any& /* valueStore */) const override {}
   bool apply_default(boost::any& valueStore) const override {
     // We're using the *current* rather than *default* value here, and
     // this is intentional; GFlags-using programs assign to FLAGS_foo
@@ -101,11 +104,11 @@ class GFlagValueSemanticBase : public po::value_semantic {
 
   void parse(boost::any& valueStore,
              const std::vector<std::string>& tokens,
-             bool utf8) const override;
+             bool /* utf8 */) const override;
 
  private:
   virtual T parseValue(const std::vector<std::string>& tokens) const = 0;
-  virtual void transform(T& val) const { }
+  virtual void transform(T& /* val */) const {}
 
   mutable std::shared_ptr<GFlagInfo<T>> info_;
 };
@@ -113,12 +116,12 @@ class GFlagValueSemanticBase : public po::value_semantic {
 template <class T>
 void GFlagValueSemanticBase<T>::parse(boost::any& valueStore,
                                       const std::vector<std::string>& tokens,
-                                      bool utf8) const {
+                                      bool /* utf8 */) const {
   T val;
   try {
     val = this->parseValue(tokens);
     this->transform(val);
-  } catch (const std::exception& e) {
+  } catch (const std::exception&) {
     throw po::invalid_option_value(
         tokens.empty() ? std::string() : tokens.front());
   }