Ticket #10325: 0005-SnifferRules.cpp-Make-the-arguments-for-operator-con.patch

File 0005-SnifferRules.cpp-Make-the-arguments-for-operator-con.patch, 1.1 KB (added by js, 7 years ago)
  • src/kits/storage/mime/SnifferRules.cpp

    From 207ed4d583bc5bafeabedfb3a64940d141d83fba Mon Sep 17 00:00:00 2001
    From: Jonathan Schleifer <js@webkeks.org>
    Date: Tue, 17 Dec 2013 18:23:26 +0100
    Subject: [PATCH 5/6] SnifferRules.cpp: Make the arguments for operator< const.
    
    It is used on const versions of sniffer_rule and thus it needs to be
    declared with const.
    ---
     src/kits/storage/mime/SnifferRules.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/kits/storage/mime/SnifferRules.cpp b/src/kits/storage/mime/SnifferRules.cpp
    index bee94c6..12efe32 100644
    a b SnifferRules::sniffer_rule::~sniffer_rule()  
    8787    rules for supertypes *after* sniffer rules for subtypes
    8888    of said supertype when both rules have identical priorities).
    8989*/
    90 bool operator<(SnifferRules::sniffer_rule &left, SnifferRules::sniffer_rule &right)
     90bool operator<(const SnifferRules::sniffer_rule &left, const SnifferRules::sniffer_rule &right)
    9191{
    9292    if (left.rule && right.rule) {
    9393        double leftPriority = left.rule->Priority();