]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #750 in SNORT/snort3 from crc_const to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 15 Dec 2016 00:01:53 +0000 (19:01 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 15 Dec 2016 00:01:53 +0000 (19:01 -0500)
Squashed commit of the following:

commit f638ff4cb5039a6b52dbc5e8d94c0aee060909a6
Author: Russ Combs <rucombs@cisco.com>
Date:   Wed Dec 14 13:20:05 2016 -0500

    const -> static const

src/flow/flow_cache.h
src/log/obfuscator.h
tools/snort2lua/data/data_types/dt_comment.h
tools/snort2lua/data/data_types/dt_var.h

index 5bd226730631bc7b9dad56ef740e1ad52af9c6df..e581a8dc391413425dedfaedfe910212f73bd5a5 100644 (file)
@@ -76,7 +76,7 @@ private:
     int remove(Flow*);
 
 private:
-    const unsigned cleanup_flows = 1;
+    static const unsigned cleanup_flows = 1;
     const FlowConfig& config;
     unsigned uni_count;
     uint32_t flags;
index 47e177a212e641ab54fae3e962422a3e6a3fdbc2..f303a14cc6ff27642025afbc7712bba8ccfdb2fb 100644 (file)
@@ -71,7 +71,7 @@ public:
 private:
     ObSet blocks;
     iterator it;
-    const char mask_char = 'X';
+    static const char mask_char = 'X';
 };
 
 #endif
index d9ec97a996b38623965ead2bd8d69ced09975911..ac348385989c046563dc98286d2afc03309f5e66 100644 (file)
@@ -68,10 +68,10 @@ private:
     bool prev_empty;
     bool header;  // true if a string was passed into constructor
     enum CommentType type;
-    const std::size_t max_line_length = 80;
-    const std::string comment_line = "--";
-    const std::string start_multi_com = "--[[";
-    const std::string end_multi_com = "--]]";
+    static const std::size_t max_line_length = 80;
+    static constexpr const char* comment_line = "--";
+    static constexpr const char* start_multi_com = "--[[";
+    static constexpr const char* end_multi_com = "--]]";
 };
 
 #endif
index 5d57876a77a7ff156b5943b841e9630d79f0a438..449d35c9094498d217586d72c732cb6132dd1890 100644 (file)
@@ -50,7 +50,7 @@ private:
     std::vector<VarData*> vars;
     std::string name;
     int depth;
-    const std::size_t max_line_length = 77; // leave room for additional text
+    static const std::size_t max_line_length = 77; // leave room for additional text
 };
 
 #endif