summaryrefslogtreecommitdiffstats
path: root/chromium/sql/statement_id.cc
blob: 530a47d6fb16edd6da072e79d8f7b011f7f418d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/390223051): Remove C-library calls to fix the errors.
#pragma allow_unsafe_libc_calls
#endif

#include <cstring>

#include "sql/statement_id.h"

namespace sql {

bool StatementID::operator<(const StatementID& rhs) const noexcept {
  if (rhs.source_line_ != source_line_)
    return source_line_ < rhs.source_line_;
  return std::strcmp(source_file_, rhs.source_file_) < 0;
}

}  // namespace sql