Разное > Свободное общение

Что делает эта строчка

(1/1)

Jak łaska za praca:

--- Код: C++ ---std::vector<Color> data; std::vector<argb_t> CustomizableImage::GetRGBAData() const{        std::vector<argb_t> temp(data.size());        auto index = 0;        for (auto &color : data) // ??        {                auto col = color.GetARGB();                std::swap(*(((uint8_t*)&col) + 0), *(((uint8_t*)&col) + 2)); //flip R/B                temp[index++] = col;        }        return temp;}

А то я не вкуриваю в чём здесь фишка.

DK:
http://www.cprogramming.com/c++11/c++11-ranged-for-loop.html

Навигация

[0] Главная страница сообщений

Перейти к полной версии