Skip to content

Commit dbd6602

Browse files
authored
Don't include c4Base.hh in Base.hh (#1351)
It breaks the Tools build by forcing the LiteCore C++ API. Instead include c4Base.h. Requires a few changes in the LiteCore C++ Tests build.
1 parent e07fa42 commit dbd6602

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

LiteCore/RevTrees/VectorRecord.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ namespace litecore {
106106
void setEncoder(FLEncoder enc) {_encoder = enc;}
107107

108108
/// Returns true if the document exists in the database.
109-
bool exists() const noexcept FLPURE {return _sequence > 0_seq;}
109+
bool exists() const noexcept FLPURE {return _sequence > sequence_t(0);}
110110

111111
/// Returns what content has been loaded: metadata, current revision, or all revisions.
112112
ContentOption contentAvailable() const noexcept FLPURE {return _whichContent;}

LiteCore/Storage/KeyStore.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//
1212

1313
#pragma once
14+
#define LITECORE_CPP_API 1
1415
#include "IndexSpec.hh"
1516
#include "RefCounted.hh"
1617
#include "RecordEnumerator.hh"
@@ -121,7 +122,7 @@ namespace litecore {
121122

122123
void setKV(Record&, ExclusiveTransaction&);
123124

124-
virtual bool del(slice key, ExclusiveTransaction&, sequence_t replacingSequence =0_seq) =0;
125+
virtual bool del(slice key, ExclusiveTransaction&, sequence_t replacingSequence ={}) =0;
125126
bool del(const Record &rec, ExclusiveTransaction &t) {return del(rec.key(), t);}
126127

127128
/** Sets a flag of a record, without having to read/write the Record. */

LiteCore/Support/Base.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "PlatformCompat.hh"
1717
#include "function_ref.hh"
1818
#include "RefCounted.hh"
19-
#include "c4Base.hh"
19+
#include "c4Base.h"
2020
#include <memory>
2121
#include <stddef.h>
2222
#include <stdint.h>

LiteCore/tests/LiteCoreTest.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
#include "PlatformCompat.hh"
1616
#include "TestsCommon.hh"
17+
#include "c4Base.hh"
1718
#include "Error.hh"
1819
#include "Logging.hh"
19-
#include "c4Base.h"
2020
#include <functional>
2121
#include <memory>
2222
#include <utility>

LiteCore/tests/VectorRecordTest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// limitations under the License.
1717
//
1818

19+
#include "c4.hh"
1920
#include "VectorRecord.hh"
2021
#include "fleece/Mutable.hh"
2122
#include <iostream>

0 commit comments

Comments
 (0)