Debian Codegraph @

mozglue/misc/LoggingCore.cpp

raw
1 /* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #include "LoggingCore.h"
7
8 #include <algorithm>
9
10 namespace mozilla {
11
12 LogLevel ToLogLevel(int32_t aLevel) {
13 aLevel = std::min(aLevel, static_cast<int32_t>(LogLevel::Verbose));
14 aLevel = std::max(aLevel, static_cast<int32_t>(LogLevel::Disabled));
15 return static_cast<LogLevel>(aLevel);
16 }
17
18 } // namespace mozilla