MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / increment

Function increment

dds/DCPS/FileSystemStorage.cpp:49–61  ·  view source on GitHub ↗

increment a filename in a lexicographical ordering

Source from the content-addressed store, hash-verified

47
48// increment a filename in a lexicographical ordering
49bool increment(ACE_TString& logical)
50{
51 for (size_t i = logical.length() - 1; i >= 1; --i) {
52 //we could use the entire range of 255 values but we'll keep
53 //these names to 7-bit ASCII
54 if (logical[i] < 0x7F) {
55 ++logical[i];
56 return true;
57 }
58 }
59
60 return false;
61}
62
63// support long paths (> 260 chars in absolute path) on Win32
64/* Windows Mobile / Windows CE (WinCE) porting notes:

Callers 2

create_next_fileMethod · 0.85
create_next_dirMethod · 0.85

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected