File indexing completed on 2024-05-12 15:49:08
0001 /* 0002 SPDX-FileCopyrightText: 2020 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 #include "barcodeutil.h" 0007 0008 using namespace Prison; 0009 0010 QList<bool> BarCodeUtil::barSequence(const char *str) 0011 { 0012 Q_ASSERT(strlen(str) == 9); // this is a internal helper tool, only called with fixed strings in here, all 9 chars long 0013 QList<bool> ret; 0014 for (int i = 0; i < 9; i++) { 0015 ret.append(str[i] == '1'); 0016 Q_ASSERT(str[i] == '0' || str[i] == '1'); 0017 } 0018 return ret; 0019 }