Formats minimally release source files based on former clang-format
This commit is contained in:
387 files changed
+37323
-38074
No files matched your search
@@ -10,61 +10,62 @@
|
||||
|
||||
namespace IDL
|
||||
{
|
||||
enum class PartitionType {
|
||||
enum class PartitionType
|
||||
{
|
||||
Any,
|
||||
Global,
|
||||
Exercise,
|
||||
AllExercises,
|
||||
Replay,
|
||||
};
|
||||
};
|
||||
|
||||
inline std::string toStdString(PartitionType pt)
|
||||
{
|
||||
inline std::string toStdString(PartitionType pt)
|
||||
{
|
||||
switch (pt)
|
||||
{
|
||||
case PartitionType::Any:
|
||||
return "Any";
|
||||
case PartitionType::Global:
|
||||
return "Global";
|
||||
case PartitionType::Exercise:
|
||||
return "Exercise";
|
||||
case PartitionType::AllExercises:
|
||||
return "AllExercises";
|
||||
case PartitionType::Replay:
|
||||
return "Replay";
|
||||
case PartitionType::Any:
|
||||
return "Any";
|
||||
case PartitionType::Global:
|
||||
return "Global";
|
||||
case PartitionType::Exercise:
|
||||
return "Exercise";
|
||||
case PartitionType::AllExercises:
|
||||
return "AllExercises";
|
||||
case PartitionType::Replay:
|
||||
return "Replay";
|
||||
}
|
||||
return std::string("invalid:") + std::to_string(static_cast<int>(pt));
|
||||
}
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& o, PartitionType pt)
|
||||
{
|
||||
inline std::ostream &operator<<(std::ostream &o, PartitionType pt)
|
||||
{
|
||||
|
||||
switch (pt)
|
||||
{
|
||||
case PartitionType::Any:
|
||||
case PartitionType::Global:
|
||||
case PartitionType::Exercise:
|
||||
case PartitionType::AllExercises:
|
||||
case PartitionType::Replay:
|
||||
return o << std::string("PartitionType::") + toStdString(pt);
|
||||
default:
|
||||
return o << std::to_string(static_cast<int>(pt));
|
||||
case PartitionType::Any:
|
||||
case PartitionType::Global:
|
||||
case PartitionType::Exercise:
|
||||
case PartitionType::AllExercises:
|
||||
case PartitionType::Replay:
|
||||
return o << std::string("PartitionType::") + toStdString(pt);
|
||||
default:
|
||||
return o << std::to_string(static_cast<int>(pt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline std::string exercisePartition(int exerciseId)
|
||||
{
|
||||
inline std::string exercisePartition(int exerciseId)
|
||||
{
|
||||
if (exerciseId < 0)
|
||||
return {"ex_*"};
|
||||
return {"ex_*"};
|
||||
return std::string("ex_") + std::to_string(exerciseId);
|
||||
}
|
||||
}
|
||||
|
||||
inline std::string replayPartition(int partitionId)
|
||||
{
|
||||
inline std::string replayPartition(int partitionId)
|
||||
{
|
||||
if (partitionId < 0)
|
||||
return {"srp_*"};
|
||||
return {"srp_*"};
|
||||
return std::string("srp_") + std::to_string(partitionId);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace IDL
|
||||
|
||||
|
||||
Reference in new issue
Block a user