MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / advanceToNextSector

Method advanceToNextSector

arch/smaky6/decoder.cc:30–54  ·  view source on GitHub ↗

Returns the sector ID of the _current_ sector. */

Source from the content-addressed store, hash-verified

28private:
29 /* Returns the sector ID of the _current_ sector. */
30 int advanceToNextSector()
31 {
32 auto previous = tell();
33 seekToIndexMark();
34 auto now = tell();
35 if ((now.ns() - previous.ns()) < 9e6)
36 {
37 seekToIndexMark();
38 auto next = tell();
39 if ((next.ns() - now.ns()) < 9e6)
40 {
41 /* We just found sector 0. */
42
43 _sectorId = 0;
44 }
45 else
46 {
47 /* Spurious... */
48
49 seek(now);
50 }
51 }
52
53 return _sectorId++;
54 }
55
56public:
57 void beginTrack() override

Callers

nothing calls this directly

Calls 1

nsMethod · 0.80

Tested by

no test coverage detected