Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-03-15 14:42:20 +0300
committerJacques Lucke <jacques@blender.org>2021-03-15 14:42:20 +0300
commit880c840c0bc5a267c65c7a526883a37908c35060 (patch)
tree86081641c34cd655a8eafdde0f19a8f9685a1ac5
parent5ad4713cd8ed2943d96a020ba63ed4d611d14007 (diff)
Fix macos compile error
`std::get` does not seem to be available. Using `std::get_if` might work instead. (Found the error on the buildbot.)
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
index c90cf1a2955..4faf0cac2c0 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_layout.cc
@@ -114,7 +114,7 @@ class ColumnLayoutDrawer : public SpreadsheetDrawer {
column.get_value(real_index, cell_value);
if (std::holds_alternative<int>(cell_value.value)) {
- const int value = std::get<int>(cell_value.value);
+ const int value = *std::get_if<int>(&cell_value.value);
const std::string value_str = std::to_string(value);
uiDefIconTextBut(params.block,
UI_BTYPE_LABEL,
@@ -133,7 +133,7 @@ class ColumnLayoutDrawer : public SpreadsheetDrawer {
nullptr);
}
else if (std::holds_alternative<float>(cell_value.value)) {
- const float value = std::get<float>(cell_value.value);
+ const float value = *std::get_if<float>(&cell_value.value);
std::stringstream ss;
ss << std::fixed << std::setprecision(3) << value;
const std::string value_str = ss.str();
@@ -154,7 +154,7 @@ class ColumnLayoutDrawer : public SpreadsheetDrawer {
nullptr);
}
else if (std::holds_alternative<bool>(cell_value.value)) {
- const bool value = std::get<bool>(cell_value.value);
+ const bool value = *std::get_if<bool>(&cell_value.value);
const int icon = value ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
uiDefIconTextBut(params.block,
UI_BTYPE_LABEL,