MCPcopy Create free account
hub / github.com/davisking/dlib / verify

Method verify

dlib/lzp_buffer/lzp_buffer_kernel_2.h:75–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 private:
74
75 inline bool verify (
76 unsigned long index
77 ) const
78 /*!
79 ensures
80 - returns true if buffer[index]'s context matches the current context
81 !*/
82 {
83 if (index+3 < buffer.size())
84 {
85 if (buffer[0] != buffer[index+1])
86 return false;
87 if (buffer[1] != buffer[index+2])
88 return false;
89 if (buffer[2] != buffer[index+3])
90 return false;
91 return true;
92 }
93 else
94 {
95 // just call this a match
96 return true;
97 }
98 }
99
100
101 sbuf buffer;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected