Remove HERE macro

Some cleanup.
Add location to some functions.
This commit is contained in:
Nekotekina
2020-12-09 18:04:52 +03:00
parent d25c401aec
commit 36c8654fb8
130 changed files with 969 additions and 889 deletions
+11 -11
View File
@@ -164,20 +164,20 @@ struct vdec_context final
}
default:
{
fmt::throw_exception("Unknown video decoder type (0x%x)" HERE, type);
fmt::throw_exception("Unknown video decoder type (0x%x)", type);
}
}
if (!codec)
{
fmt::throw_exception("avcodec_find_decoder() failed (type=0x%x)" HERE, type);
fmt::throw_exception("avcodec_find_decoder() failed (type=0x%x)", type);
}
ctx = avcodec_alloc_context3(codec);
if (!ctx)
{
fmt::throw_exception("avcodec_alloc_context3() failed (type=0x%x)" HERE, type);
fmt::throw_exception("avcodec_alloc_context3() failed (type=0x%x)", type);
}
AVDictionary* opts{};
@@ -189,7 +189,7 @@ struct vdec_context final
if (err || opts)
{
avcodec_free_context(&ctx);
fmt::throw_exception("avcodec_open2() failed (err=0x%x, opts=%d)" HERE, err, opts ? 1 : 0);
fmt::throw_exception("avcodec_open2() failed (err=0x%x, opts=%d)", err, opts ? 1 : 0);
}
}
@@ -275,7 +275,7 @@ struct vdec_context final
{
char av_error[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret);
fmt::throw_exception("AU queuing error(0x%x): %s" HERE, ret, av_error);
fmt::throw_exception("AU queuing error(0x%x): %s", ret, av_error);
}
while (true)
@@ -286,7 +286,7 @@ struct vdec_context final
if (!frame.avf)
{
fmt::throw_exception("av_frame_alloc() failed" HERE);
fmt::throw_exception("av_frame_alloc() failed");
}
if (int ret = avcodec_receive_frame(ctx, frame.avf.get()); ret < 0)
@@ -299,7 +299,7 @@ struct vdec_context final
{
char av_error[AV_ERROR_MAX_STRING_SIZE];
av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret);
fmt::throw_exception("AU decoding error(0x%x): %s" HERE, ret, av_error);
fmt::throw_exception("AU decoding error(0x%x): %s", ret, av_error);
}
}
@@ -344,7 +344,7 @@ struct vdec_context final
case CELL_VDEC_FRC_60: amend = 90000 / 60; break;
default:
{
fmt::throw_exception("Invalid frame rate code set (0x%x)" HERE, frc_set);
fmt::throw_exception("Invalid frame rate code set (0x%x)", frc_set);
}
}
@@ -834,7 +834,7 @@ error_code cellVdecGetPicture(u32 handle, vm::cptr<CellVdecPicFormat> format, vm
default:
{
fmt::throw_exception("Unknown formatType (%d)" HERE, type);
fmt::throw_exception("Unknown formatType (%d)", type);
}
}
@@ -857,7 +857,7 @@ error_code cellVdecGetPicture(u32 handle, vm::cptr<CellVdecPicFormat> format, vm
break;
default:
{
fmt::throw_exception("Unknown format (%d)" HERE, frame->format);
fmt::throw_exception("Unknown format (%d)", frame->format);
}
}
@@ -899,7 +899,7 @@ error_code cellVdecGetPictureExt(u32 handle, vm::cptr<CellVdecPicFormat2> format
if (arg4 || format2->unk0 || format2->unk1)
{
fmt::throw_exception("Unknown arguments (arg4=*0x%x, unk0=0x%x, unk1=0x%x)" HERE, arg4, format2->unk0, format2->unk1);
fmt::throw_exception("Unknown arguments (arg4=*0x%x, unk0=0x%x, unk1=0x%x)", arg4, format2->unk0, format2->unk1);
}
vm::var<CellVdecPicFormat> format;