[Vala] Accessing properties of a Map.Entry from a read-only Gee map causes compiler warning
- From: Nicolas Laplante <nicolas laplante gmail com>
- To: vala-list gnome org
- Subject: [Vala] Accessing properties of a Map.Entry from a read-only Gee map causes compiler warning
- Date: Thu, 19 Nov 2015 14:33:36 -0500
I have the following map declaration:
Map<GB.Model.Date, Gee.List<Transaction>> transactions_by_date = new
HashMap<GB.Model.Date, Gee.List<Transaction>> ();
Then I iterate over its entries:
foreach (Map.Entry<GB.Model.Date, Gee.List<Transaction>> entry in
transactions_by_date.entries) {
// ...
// ...
}
Within this loop, whenver I access entry.key or entry.value, I get the
following compiler warning:
src/ui/tree_store_transaction.vala:284:14: warning: assignment discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
debug ("transaction group: %s (%d
transaction(s))", entry.key.to_string (), entry.value.size);
I get this warning for each line accessing properties of the "entry"
variable. Is this normal?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]