Fix some engine build warnings.

* src/engine/imap/command/imap-create-command.vala: Enums can't be null?

* src/engine/rfc822/rfc822-message.vala: Gee.Map has deprecated contains?!
This commit is contained in:
Michael James Gratton 2017-12-02 00:55:33 +11:00
parent f8dc87cb36
commit d66e4526bd
2 changed files with 8 additions and 3 deletions

View file

@ -15,7 +15,10 @@ public class Geary.Imap.CreateCommand : Command {
public const string USE = "use";
public MailboxSpecifier mailbox { get; private set; }
public Geary.SpecialFolderType? use { get; private set; default = null; }
public Geary.SpecialFolderType use {
get; private set; default = Geary.SpecialFolderType.NONE;
}
private static MailboxAttribute? get_special_folder_type(Geary.SpecialFolderType type) {
@ -52,8 +55,10 @@ public class Geary.Imap.CreateCommand : Command {
add(mailbox.to_parameter());
}
public CreateCommand.special_use(MailboxSpecifier mailbox, Geary.SpecialFolderType use) {
public CreateCommand.special_use(MailboxSpecifier mailbox,
Geary.SpecialFolderType use) {
this(mailbox);
this.use = use;
MailboxAttribute? attr = get_special_folder_type(use);
if (attr != null) {

View file

@ -211,7 +211,7 @@ public class Geary.RFC822.Message : BaseObject {
string cid = "";
do {
cid = CID_TEMPLATE.printf(cid_index++);
} while (cid in email.cid_files);
} while (email.cid_files.has_key(cid));
if (email.replace_inline_img_src(name,
CID_URL_PREFIX + cid)) {