]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Combine struct elements to avoid inheritance
authorMatthew Barr <matthew.barr@intel.com>
Tue, 10 May 2016 03:14:25 +0000 (13:14 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 18 May 2016 06:28:44 +0000 (16:28 +1000)
The multiple inheritance here was slightly overkill, and it also appears to
trigger a MSVC bug when writing through the pointer to member.

src/nfagraph/ng_depth.h

index 38a98a1c6ed89b72b49445655c0efc5872923081..16231ea1e0e8fe79dfac8830847889abe4519146 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -64,7 +64,11 @@ struct NFAVertexRevDepth {
 /**
  * \brief Encapsulates min/max depths relative to all of our special vertices.
  */
-struct NFAVertexBidiDepth : NFAVertexDepth, NFAVertexRevDepth {
+struct NFAVertexBidiDepth {
+    DepthMinMax fromStart;
+    DepthMinMax fromStartDotStar;
+    DepthMinMax toAccept;
+    DepthMinMax toAcceptEod;
 };
 
 /**