aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/PostBuildLint_ConfigurationType.cpp
blob: 7edd927a39cad3927d9adc2b727c2cb4ab5d431d (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
#include "pch.h"
#include "PostBuildLint_ConfigurationType.h"
#include "vcpkg_Enums.h"
#include "PackageSpec.h"

namespace vcpkg::PostBuildLint::ConfigurationType
{
    static const std::string NULLVALUE_STRING = Enums::nullvalue_toString(ENUM_NAME);

    static const std::string NAME_DEBUG = "Debug";
    static const std::string NAME_RELEASE = "Release";

    const std::string& Type::toString() const
    {
        switch (this->backing_enum)
        {
        case ConfigurationType::DEBUG:
            return NAME_DEBUG;
        case ConfigurationType::RELEASE:
            return NAME_RELEASE;
        case ConfigurationType::NULLVALUE:
            return NULLVALUE_STRING;
        default:
            Checks::unreachable(VCPKG_LINE_INFO);
        }
    }
}