mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-26 16:57:32 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
509807d3c2 | |||
c07744dc0d |
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -179,19 +179,19 @@ jobs:
|
||||
|
||||
conf_test_windows:
|
||||
name: Test configuration on Windows
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-2022
|
||||
needs: [gcc, clang]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: 32-bit
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
|
||||
cl /Isrc extras/conf_test/x86.cpp
|
||||
shell: cmd
|
||||
- name: 64-bit
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cl /Isrc extras/conf_test/x64.cpp
|
||||
shell: cmd
|
||||
|
||||
|
@ -59,10 +59,11 @@ class CollectionIterator {
|
||||
}
|
||||
|
||||
private:
|
||||
CollectionIterator(VariantData* slot, SlotId slotId);
|
||||
CollectionIterator(VariantData* slot, SlotId slotId)
|
||||
: slot_(slot), currentId_(slotId) {}
|
||||
|
||||
VariantData* slot_;
|
||||
SlotId currentId_, nextId_;
|
||||
SlotId currentId_;
|
||||
};
|
||||
|
||||
class CollectionData {
|
||||
|
@ -12,17 +12,11 @@
|
||||
|
||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||
|
||||
inline CollectionIterator::CollectionIterator(VariantData* slot, SlotId slotId)
|
||||
: slot_(slot), currentId_(slotId) {
|
||||
nextId_ = slot_ ? slot_->next() : NULL_SLOT;
|
||||
}
|
||||
|
||||
inline void CollectionIterator::next(const ResourceManager* resources) {
|
||||
ARDUINOJSON_ASSERT(currentId_ != NULL_SLOT);
|
||||
slot_ = resources->getVariant(nextId_);
|
||||
currentId_ = nextId_;
|
||||
if (slot_)
|
||||
nextId_ = slot_->next();
|
||||
ARDUINOJSON_ASSERT(slot_);
|
||||
auto nextId = slot_->next();
|
||||
slot_ = resources->getVariant(nextId);
|
||||
currentId_ = nextId;
|
||||
}
|
||||
|
||||
inline CollectionData::iterator CollectionData::createIterator(
|
||||
@ -104,9 +98,9 @@ inline void CollectionData::removePair(ObjectData::iterator it,
|
||||
if (it.done())
|
||||
return;
|
||||
|
||||
auto keySlot = it.slot_;
|
||||
auto keySlot = it.data();
|
||||
|
||||
auto valueId = it.nextId_;
|
||||
auto valueId = keySlot->next();
|
||||
auto valueSlot = resources->getVariant(valueId);
|
||||
|
||||
// remove value slot
|
||||
|
Reference in New Issue
Block a user