Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • next protected
  • UI-EvenMoreTweaks
  • merge/materials_featurette protected
  • merge/webrtc protected
  • darl/linux-sh-installer
  • xenhat/maint/bolt
  • xenhat/features/cinematic-mode-new
  • screensquare
  • ssestuff
  • spdlog
  • 7.1.7.2486-beta
  • 7.1.4.2442-beta
  • 7.1.4.2413-beta
  • 7.1.3.2338-beta
  • 7.1.3.2332-beta
  • 7.1.2.2304-beta
  • 7.1.1.2251-beta
  • 7.0.1.2244-beta
  • 7.0.1.2240-beta
  • 7.0.1.2230-beta
  • 7.0.1.2206-beta
22 results

lleventdispatcher_test.cpp

  • Nat Goodspeed's avatar
    d814e76c
    Introduce BOOST_FOREACH() helpers for LLSD in llsdutil.h. · d814e76c
    Nat Goodspeed authored
    You can't directly write:
    BOOST_FOREACH(LLSD item, someLLSDarray) { ... }
    because LLSD has two distinct iteration mechanisms, one for arrays and one for
    maps, neither using the standard [const_]iterator typedefs or begin()/end()
    methods. But with these helpers, you can write:
    BOOST_FOREACH(LLSD item, llsd::inArray(someLLSDarray)) { ... }
    or
    BOOST_FOREACH(const llsd::MapEntry& pair, llsd::inMap(someLLSDmap)) { ... }
    These are in namespace llsd instead of being (e.g.) llsd_inMap because with a
    namespace at least your .cpp file can have a local 'using':
    using namespace llsd;
    BOOST_FOREACH(LLSD item, inArray(someLLSDarray)) { ... }
    It's namespace llsd rather than LLSD because LLSD can't be both a namespace
    and a class name.
    d814e76c
    History
    Introduce BOOST_FOREACH() helpers for LLSD in llsdutil.h.
    Nat Goodspeed authored
    You can't directly write:
    BOOST_FOREACH(LLSD item, someLLSDarray) { ... }
    because LLSD has two distinct iteration mechanisms, one for arrays and one for
    maps, neither using the standard [const_]iterator typedefs or begin()/end()
    methods. But with these helpers, you can write:
    BOOST_FOREACH(LLSD item, llsd::inArray(someLLSDarray)) { ... }
    or
    BOOST_FOREACH(const llsd::MapEntry& pair, llsd::inMap(someLLSDmap)) { ... }
    These are in namespace llsd instead of being (e.g.) llsd_inMap because with a
    namespace at least your .cpp file can have a local 'using':
    using namespace llsd;
    BOOST_FOREACH(LLSD item, inArray(someLLSDarray)) { ... }
    It's namespace llsd rather than LLSD because LLSD can't be both a namespace
    and a class name.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.