summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.74.0/tests/input/d/volatile.d
blob: c42d1893cb92de65f9099b8ea8c14678cd41220b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
void foo(void)
{
while (nextSegmentIndex >= 0)
{
    Segment seg = map.segments[nextSegmentIndex--];
    volatile if (seg.count)
        {
            currentTable = seg.table;
            for (int j = currentTable.length - 1; j >= 0; --j)
            {
                if ((nextEntry = currentTable[j]) !is null)
                {
                    nextTableIndex = j - 1;
                    return;
                }
            }
        }
}

if (e)
    volatile
    {
        oldValue = e.value;
        e.value  = newValue;
    }
return oldValue;
}