Skip to content

Instantly share code, notes, and snippets.

@define-private-public
Last active April 16, 2024 23:30
Show Gist options
  • Select an option

  • Save define-private-public/e93c4bbb89482d5d07e36eed104f92a2 to your computer and use it in GitHub Desktop.

Select an option

Save define-private-public/e93c4bbb89482d5d07e36eed104f92a2 to your computer and use it in GitHub Desktop.

Revisions

  1. define-private-public renamed this gist Apr 16, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. define-private-public revised this gist Apr 16, 2024. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions FINAL_being_used.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    $ rg FINAL

    RandomGenerator.hpp
    185:class RandomGenerator FINAL : public _GeneralizedRandomGenerator<std::uniform_real_distribution, rreal, RNG_ENGINE> {

    Materials/Lambertian.hpp
    8:class Lambertian FINAL : public IMaterial {

    ...

    Materials/SurfaceNormal.hpp
    7:class SurfaceNormal FINAL : public IMaterial {

    ...

    PDFs/HittablePDF.hpp
    7:class HittablePDF FINAL : public IPDF {

    ...

    Objects/Sphere.hpp
    19:class Sphere FINAL : public IHittable {
  3. define-private-public renamed this gist Apr 16, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. define-private-public revised this gist Apr 16, 2024. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Common.hpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #ifdef USE_FINAL
    #define FINAL final
    #else
    #define FINAL
    #endif
  5. define-private-public revised this gist Apr 16, 2024. No changes.
  6. define-private-public created this gist Apr 15, 2024.
    10 changes: 10 additions & 0 deletions 1.CMakeLists.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    option(WITH_FINAL "Use the `final` specifier on derived classes (faster?)" OFF)

    # ...

    if (WITH_FINAL)
    message(STATUS "Using `final` spicifer (faster?)")
    target_compile_definitions(PSRayTracing_StaticLibrary PUBLIC USE_FINAL)
    else()
    message(STATUS "Turned off use of `final` (slower?)")
    endif()