Skip to content

Commit 2a0ef88

Browse files
committed
Fix windows compile
1 parent cae10b0 commit 2a0ef88

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/libdrt/search/dataref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool DataRefUpdater::operator()(std::vector<float>&) const {
8080
int current_array_length = XPLMGetDatavf(dr->ref, nullptr, 0, 0);
8181
static std::vector<float> scratch_buffer;
8282
scratch_buffer.resize(current_array_length);
83-
std::fill(scratch_buffer.begin(), scratch_buffer.end(), 0);
83+
std::fill(scratch_buffer.begin(), scratch_buffer.end(), 0.f);
8484
int copied = XPLMGetDatavf(dr->ref, scratch_buffer.data(), 0, current_array_length);
8585
if(copied == current_array_length) {
8686
size_t new_hash = boost::hash_range(scratch_buffer.cbegin(), scratch_buffer.cend());

src/plugin/internal_dataref_list.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// grep private drt_last_run_datarefs.txt > datarefs_keep.txt
99
// grep iphone drt_last_run_datarefs.txt >> datarefs_keep.txt
1010
//
11-
// This was done on mac. I couldn't get the list consistently on windows.
11+
// This list is broken into several sections due to limitations of string literal
12+
// length in the visual studio compiler.
1213

1314
const char * raw_list = R"""(
1415
sim/private/controls/acf/debug/reload_config
@@ -361,7 +362,8 @@ sim/private/controls/clouds/skip_map
361362
sim/private/controls/clouds/skip_write
362363
sim/private/controls/clouds/soft_occlude
363364
sim/private/controls/clouds/spec_gain
364-
sim/private/controls/clouds/str/alpha_layer_0
365+
)"""
366+
R"""(sim/private/controls/clouds/str/alpha_layer_0
365367
sim/private/controls/clouds/str/alpha_layer_1
366368
sim/private/controls/clouds/str/alpha_layer_2
367369
sim/private/controls/clouds/str/alpha_layer_3
@@ -681,7 +683,8 @@ sim/private/controls/road/max_uv_distort
681683
sim/private/controls/road/min_smooth_len
682684
sim/private/controls/road/no_composites
683685
sim/private/controls/road/no_plug
684-
sim/private/controls/road/over_under_slop
686+
)"""
687+
R"""(sim/private/controls/road/over_under_slop
685688
sim/private/controls/road/powerline_base_extra
686689
sim/private/controls/road/powerline_base_max
687690
sim/private/controls/road/powerline_base_width
@@ -925,7 +928,8 @@ sim/private/controls/water/noise_bias_gen_x
925928
sim/private/controls/water/noise_bias_gen_y
926929
sim/private/controls/water/noise_dir
927930
sim/private/controls/water/noise_speed
928-
sim/private/controls/water/perlin_wave1_amp
931+
)"""
932+
R"""(sim/private/controls/water/perlin_wave1_amp
929933
sim/private/controls/water/perlin_wave1_hdg
930934
sim/private/controls/water/perlin_wave1_rat
931935
sim/private/controls/water/perlin_wave2_amp

0 commit comments

Comments
 (0)