• X xray-16
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 216
    • Задачи 216
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 31
    • Запросы на слияние 31
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • OpenXRay
  • xray-16
  • Запросы на слияние
  • !911

Clean up and reorder render layer define directives.

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты xottab-duty запросил слияние github/fork/betstick/betstick_renderlayer-define-cleanup в dev Ноя 21, 2021
  • Обзор 47
  • Коммиты 25
  • Конвейеры 0
  • Изменения 66

Created by: betstick

Reorder #define directives to be ordered from oldest to newest render layers: USE_DX9 -> USE_DX11 -> USE_OGL Not all could be organized this way without substantial code duplication.

Got rid of almost if not all of the negative(?) defines for render layers. Examples: #ifndef USE_OGL -> #if defined(USE_DX9) || defined(USE_DX11) #if !defined(USE_DX9) && !defined(USE_DX11) -> #if defined(USE_OGL) This should help in the event that a new render layer is added to prevent unexpected code to be compiled/run. This predicates on there only ever being one layer active at a time per "unit" or whatever. So #if defined(USE_DX9) && defined(USE_DX11) should always be false.

Explicitly defined some conditions for readability and to prevent unpredictable behavior in the event that the render layers are changed. Example:

#ifdef USE_DX9
    //some code
#else
    //some code
#endif

becomes the following:

#ifdef USE_DX9
    //some code
#elif defined(USE_DX11) || defined(USE_OGL)
    //some code
#else
#error No graphics API selected or in use!
#endif

Finally, added some fail conditions so that if no render layers are used for a given code fragment the compiler will error out. Example:

#if defined(USE_DX9) || defined(USE_DX11)
    //some code
#elif defined(USE_OGL)
    //some code
#else
#error No graphics API selected or in use!
#endif

I tried to avoid any changes possible to code style/format outside of reordering lines.

Note, I named the commit a bad name and I can't figure out how to undo this. Also, the created/modified dates on the files are totally screwed up since I tar'd and untar'd a local copy of the repo a few times across Windows and Linux to test compilation. This is not a 100% cleanup, but it was everything I could find across several text searches of the repo for specific directives. This is my first pull request so please let me know if I messed up/broke something.

Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: github/fork/betstick/betstick_renderlayer-define-cleanup