03b57a7d27
* Use clang-format * Create .clang-format * Update .clang-format * Update .clang-format * Update .clang-format * Only search in cpp dirs * Update clang-format.sh * Update .clang-format * Update .clang-format * Update .clang-format * Format C++ code! * Use version 16 * Update clang-format.sh * Remove Shaders.ts * fix: Lint Swift
26 lines
506 B
Swift
26 lines
506 B
Swift
//
|
|
// AVCaptureDevice.Position+descriptor.swift
|
|
// mrousavy
|
|
//
|
|
// Created by Marc Rousavy on 15.12.20.
|
|
// Copyright © 2020 mrousavy. All rights reserved.
|
|
//
|
|
|
|
import AVFoundation
|
|
import Foundation
|
|
|
|
extension AVCaptureDevice.Position {
|
|
var descriptor: String {
|
|
switch self {
|
|
case .back:
|
|
return "back"
|
|
case .front:
|
|
return "front"
|
|
case .unspecified:
|
|
return "unspecified"
|
|
@unknown default:
|
|
fatalError("AVCaptureDevice.Position has unknown state.")
|
|
}
|
|
}
|
|
}
|