2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Start data export in lib_export.

This commit is contained in:
John Preston
2018-06-02 17:29:21 +03:00
parent c2fa149ffd
commit c587c011d2
52 changed files with 1994 additions and 320 deletions

View File

@@ -635,7 +635,7 @@ for restype in typesList:
getters += '\tconst MTPD' + name + ' &c_' + name + '() const;\n'; # const getter
constructsBodies += 'const MTPD' + name + ' &MTP' + restype + '::c_' + name + '() const {\n';
if (withType):
constructsBodies += '\tAssert(_type == mtpc_' + name + ');\n';
constructsBodies += '\tExpects(_type == mtpc_' + name + ');\n\n';
constructsBodies += '\treturn queryData<MTPD' + name + '>();\n';
constructsBodies += '}\n';
@@ -771,7 +771,7 @@ for restype in typesList:
typesText += '\tmtpTypeId type() const;\n'; # type id method
methods += 'mtpTypeId MTP' + restype + '::type() const {\n';
if (withType):
methods += '\tAssert(_type != 0);\n';
methods += '\tExpects(_type != 0);\n\n';
methods += '\treturn _type;\n';
else:
methods += '\treturn mtpc_' + v[0][0] + ';\n';