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

Method clear

dlib/tokenizer/tokenizer_kernel_1.cpp:49–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47// ----------------------------------------------------------------------------------------
48
49 void tokenizer_kernel_1::
50 clear(
51 )
52 {
53 using namespace std;
54
55 in = 0;
56 streambuf = 0;
57 have_peeked = false;
58
59 head = "_" + lowercase_letters() + uppercase_letters();
60 body = "_" + lowercase_letters() + uppercase_letters() + numbers();
61
62 for (unsigned long i = 0; i < UCHAR_MAX; ++i)
63 {
64 headset[i] = false;
65 bodyset[i] = false;
66 }
67
68 for (string::size_type i = 0; i < head.size(); ++i)
69 headset[static_cast<unsigned char>(head[i])] = true;
70 for (string::size_type i = 0; i < body.size(); ++i)
71 bodyset[static_cast<unsigned char>(body[i])] = true;
72 }
73
74// ----------------------------------------------------------------------------------------
75

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected